/* Visualizador unificado de imagens e vídeos */
.mv-root {
    position: fixed;
    inset: 0;
    z-index: 10800;
    display: none;
    flex-direction: column;
    background: #0f1419;
    color: #e8eef4;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.mv-root.mv-open {
    display: flex;
}
.mv-hidden {
    display: none !important;
}

/* Toolbar normal */
.mv-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    background: rgba(15, 20, 25, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mv-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Barra modo apresentação (mosaico + sair) */
.mv-fs-bar {
    display: none;
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10810;
    gap: 0.5rem;
    align-items: center;
}
.mv-root.mv-presentation .mv-fs-bar {
    display: flex;
}
.mv-root.mv-presentation:not(.mv-ui-visible):not(:hover) .mv-fs-bar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.mv-root.mv-presentation:hover .mv-fs-bar,
.mv-root.mv-presentation.mv-ui-visible .mv-fs-bar {
    opacity: 1;
    pointer-events: auto;
}
.mv-btn-exit-pres {
    font-weight: 500;
}

.mv-root.mv-presentation .mv-toolbar {
    opacity: 0;
    pointer-events: none;
}
.mv-root.mv-presentation:hover .mv-toolbar,
.mv-root.mv-presentation.mv-ui-visible .mv-toolbar {
    opacity: 1;
    pointer-events: auto;
}

.mv-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #e8eef4;
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    font-size: 0.8125rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.mv-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}
.mv-btn.active {
    background: #2563eb;
    border-color: #2563eb;
}
.mv-btn-icon {
    padding: 0.35rem 0.45rem;
}

/* Mosaico */
.mv-root.mv-mosaic .mv-stage {
    display: none !important;
}
.mv-root.mv-mosaic .mv-mosaic-wrap {
    display: flex;
}
.mv-mosaic-wrap {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}
.mv-mosaic {
    flex: 1;
    overflow: auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.65rem;
    align-content: start;
}
.mv-mosaic.mv-mosaic-fill {
    grid-template-columns: repeat(var(--mv-cols, 4), 1fr);
    grid-template-rows: repeat(var(--mv-rows, 1), 1fr);
    align-content: stretch;
    height: 100%;
    min-height: 0;
}
.mv-mosaic.mv-mosaic-fill .mv-mosaic-item {
    aspect-ratio: auto;
    min-height: 0;
    height: 100%;
}
.mv-mosaic-pager {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(15, 20, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mv-mosaic-pager-info {
    font-size: 0.8125rem;
    color: #94a3b8;
}
.mv-mosaic-item {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #1e293b;
    cursor: pointer;
    aspect-ratio: 4/3;
    position: relative;
}
.mv-mosaic-item.mv-active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.45);
}
.mv-mosaic-item img,
.mv-mosaic-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.mv-mosaic-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    font-size: 2rem;
    color: #fff;
    pointer-events: none;
}

/* Área ampliada */
.mv-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 0;
    overflow: hidden;
}
.mv-stage-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}
.mv-stage-inner {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
}
.mv-media-wrap {
    position: relative;
    transform-origin: center center;
    transition: transform 0.06s ease-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mv-media-frame {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.mv-media-frame img.mv-media,
.mv-media-frame video.mv-media {
    display: block;
    max-width: none;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
}
.mv-media-frame video.mv-media {
    pointer-events: auto;
}

/* Ícone ⓘ — canto superior direito da imagem */
.mv-info-trigger {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 6;
    width: 30px;
    height: 30px;
    margin: 6px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.mv-info-trigger.mv-info-icon-visible {
    opacity: 1;
}
.mv-info-trigger:hover {
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
}

/* Legenda abaixo da imagem */
.mv-caption {
    flex: 0 0 auto;
    text-align: center;
    padding: 0.65rem 4rem 0.5rem;
    max-width: 100%;
}
.mv-caption-desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #f1f5f9;
}
.mv-caption-date {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* Rodapé: índice (esq) · tamanho (centro) · zoom + atalhos (dir) */
.mv-footer {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.85rem;
    background: rgba(15, 20, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mv-footer-left {
    justify-self: start;
    min-width: 0;
}
.mv-footer-center {
    justify-self: center;
    text-align: center;
}
.mv-footer-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.mv-root.mv-mosaic .mv-footer-zoom {
    display: none;
}
.mv-root.mv-mosaic .mv-footer {
    grid-template-columns: 1fr 1fr;
}
.mv-counter {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}
.mv-dim-label {
    font-size: 0.8125rem;
    color: #cbd5e1;
    white-space: nowrap;
}
.mv-zoom-bar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.mv-zoom-select {
    width: 4.2rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e8eef4;
    border-radius: 6px;
    padding: 0.15rem;
    font-size: 0.75rem;
}
.mv-zoom-slider {
    width: 110px;
    accent-color: #3b82f6;
}
.mv-zoom-pct {
    font-size: 0.75rem;
    color: #94a3b8;
    min-width: 2.5rem;
    text-align: right;
}

/* Painel de atalhos */
.mv-shortcuts-overlay {
    position: fixed;
    inset: 0;
    z-index: 10820;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.mv-shortcuts-overlay[hidden] {
    display: none !important;
}
.mv-shortcuts-panel {
    position: relative;
    z-index: 1;
    width: min(480px, 92vw);
    max-height: min(80vh, 560px);
    overflow: auto;
    padding: 1.25rem 1.5rem;
    background: rgba(15, 20, 25, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.mv-shortcuts-overlay.mv-info-overlay-open .mv-shortcuts-panel {
    opacity: 1;
    transform: scale(1);
}
.mv-shortcuts-head {
    font-size: 1rem;
    font-weight: 600;
    color: #e8eef4;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.mv-shortcuts-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}
.mv-shortcuts-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.875rem;
}
.mv-shortcuts-list kbd {
    flex: 0 0 auto;
    min-width: 5.5rem;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: inherit;
    color: #f1f5f9;
}
.mv-shortcuts-list span {
    color: #94a3b8;
    flex: 1;
}
.mv-shortcuts-close {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #e8eef4;
    cursor: pointer;
    font-size: 0.8125rem;
}
.mv-shortcuts-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mv-info-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mv-shortcuts-overlay.mv-info-overlay-open .mv-info-backdrop {
    opacity: 1;
}

/* Painel de informações — barra lateral à direita */
.mv-info-sidebar {
    flex: 0 0 var(--mv-info-sidebar-w, min(380px, 38vw));
    width: var(--mv-info-sidebar-w, min(380px, 38vw));
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(15, 20, 25, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}
.mv-info-sidebar[hidden] {
    display: none !important;
}
.mv-root.mv-info-open {
    --mv-info-sidebar-w: min(380px, 38vw);
}
.mv-info-sidebar .mv-info-panel {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem 1.25rem;
    min-height: 0;
}
.mv-info-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin: -0.15rem 0 0.35rem 0.35rem;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #e8eef4;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mv-info-close:hover {
    background: rgba(239, 68, 68, 0.75);
}
.mv-info-head {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.65rem;
    padding-right: 0.25rem;
}
.mv-info-desc {
    font-size: 1rem;
    line-height: 1.5;
    color: #f1f5f9;
    margin: 0 0 0.85rem;
}
.mv-info-dl {
    margin: 0;
    font-size: 0.875rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.85rem;
}
.mv-info-dl dt {
    color: #64748b;
    margin: 0;
}
.mv-info-dl dd {
    margin: 0;
    color: #cbd5e1;
    word-break: break-word;
}
.mv-info-exif-section {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mv-info-exif-head {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
.mv-info-map-wrap {
    margin-top: 0.85rem;
}
.mv-info-map-toolbar {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}
.mv-info-map-toolbar .mv-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.28rem 0.4rem;
}
.mv-info-map-toolbar .mv-btn.active {
    background: #2563eb;
    border-color: #2563eb;
}
.mv-info-map {
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    background: #1e293b;
}
.mv-info-map-link {
    display: block;
    padding: 0.75rem;
    color: #60a5fa;
    font-size: 0.875rem;
}
.mv-root.mv-info-open .mv-nav-next {
    right: calc(var(--mv-info-sidebar-w, min(380px, 38vw)) + 0.5rem);
}
.mv-info-trigger.mv-info-active {
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
    opacity: 1;
}

.mv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 44px;
    height: 64px;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 6px;
}
.mv-nav:hover {
    background: rgba(37, 99, 235, 0.75);
}
.mv-nav-prev { left: 0.5rem; }
.mv-nav-next { right: 0.5rem; }

.mv-stage-inner.mv-zoomed { cursor: grab; }
.mv-stage-inner.mv-panning { cursor: grabbing; }

.mv-root:fullscreen .mv-stage-column {
    height: 100%;
}

.midia-viewer-thumb,
.midia-viewer-item,
button.midia-viewer-item {
    cursor: zoom-in;
}
.midia-viewer-thumb img,
.midia-viewer-thumb video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mv-info-actions {
    margin-bottom: 0.75rem;
}
.mv-info-download-georef {
    width: 100%;
    justify-content: center;
}

/* Modal de opções — download georreferenciado */
.georef-layout-modal {
    position: fixed;
    inset: 0;
    z-index: 10900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.georef-layout-modal.georef-layout-open {
    opacity: 1;
    pointer-events: auto;
}
.georef-layout-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.georef-layout-panel {
    position: relative;
    width: min(440px, 100%);
    max-height: min(90vh, 640px);
    overflow: auto;
    background: #fff;
    color: #212529;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 1rem 1.1rem 1.1rem;
}
.georef-layout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.georef-layout-head h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.georef-layout-close {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
}
.georef-layout-intro {
    font-size: 0.8125rem;
    color: #6c757d;
    margin: 0 0 0.85rem;
}
.georef-layout-section {
    margin-bottom: 0.85rem;
}
.georef-layout-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #495057;
    margin-bottom: 0.4rem;
}
.georef-layout-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.georef-layout-options-inline {
    flex-direction: row;
    flex-wrap: wrap;
}
.georef-layout-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
    transition: border-color 0.15s, background 0.15s;
}
.georef-layout-option:hover {
    border-color: #adb5bd;
    background: #f8f9fa;
}
.georef-layout-option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}
.georef-layout-option:has(input:checked) {
    border-color: #0d6efd;
    background: #f0f6ff;
}
.georef-layout-option-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.875rem;
}
.georef-layout-option-body strong {
    font-weight: 600;
}
.georef-layout-option-body small {
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.35;
}
.georef-layout-option-compact {
    flex: 1;
    min-width: 120px;
    align-items: center;
}
.georef-layout-option-compact .georef-layout-option-body {
    flex-direction: row;
}
.georef-layout-preview {
    margin: 0.75rem 0 0.85rem;
    padding: 0.65rem;
    background: #2a3238;
    border-radius: 8px;
}
.georef-preview-bar {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    min-height: 42px;
}
.georef-preview-sem-mapa .georef-preview-bar {
    gap: 0;
}
.georef-preview-map {
    flex: 0 0 auto;
    align-self: stretch;
    aspect-ratio: 1;
    width: auto;
    min-width: 36px;
    max-width: 72px;
    background: linear-gradient(135deg, #3d5a45 0%, #5c7a52 40%, #2d4a38 100%);
    border: 2px solid rgba(255, 255, 255, 0.85);
    position: relative;
}
.georef-preview-map::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 42%;
    width: 8px;
    height: 8px;
    margin: -6px 0 0 -4px;
    background: #e53935;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
}
.georef-preview-pequena .georef-preview-bar {
    min-height: 36px;
}
.georef-preview-minimo .georef-preview-bar {
    min-height: 28px;
}
.georef-preview-minimo .georef-preview-line {
    font-size: 0.52rem;
}
.georef-preview-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    min-width: 0;
}
.georef-preview-line {
    display: block;
    color: #fff;
    font-size: 0.55rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.georef-preview-grande .georef-preview-title {
    font-size: 0.65rem;
    font-weight: 700;
}
.georef-preview-pequena .georef-preview-title {
    font-size: 0.6rem;
    font-weight: 700;
}
.georef-layout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

/* Editor de coordenadas GPS (Detalhes do Local) */
.mv-coords-overlay {
    position: fixed;
    inset: 0;
    z-index: 10950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.mv-coords-overlay.mv-coords-open {
    opacity: 1;
    pointer-events: auto;
}
.mv-coords-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}
.mv-coords-panel {
    position: relative;
    width: min(720px, 100%);
    max-height: min(92vh, 860px);
    overflow: auto;
    background: #fff;
    color: #212529;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    padding: 1rem 1.1rem 1.1rem;
}
.mv-infos-section {
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}
.mv-infos-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0.5rem;
}
.mv-infos-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #495057;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.mv-infos-exif-grid .form-label {
    color: #6c757d;
}
.mv-infos-hint {
    margin-bottom: 0.75rem;
}
.mv-coords-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.mv-coords-head h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.mv-coords-close {
    border: none;
    background: transparent;
    color: #6c757d;
    padding: 0.25rem;
    cursor: pointer;
}
.mv-coords-hint {
    font-size: 0.8125rem;
    color: #6c757d;
    margin: 0 0 0.65rem;
}
.mv-coords-map {
    height: 280px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 0.75rem;
    z-index: 0;
}
.mv-coords-fields .form-label {
    color: #495057;
}
.mv-coords-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.mv-coords-actions-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.mv-coords-actions-main {
    display: flex;
    gap: 0.45rem;
    margin-left: auto;
}
.mv-coords-use-ponto {
    font-size: 0.8125rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0a58ca;
    color: #fff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.35);
}
.mv-coords-use-ponto:hover:not(:disabled) {
    background: linear-gradient(135deg, #0b5ed7 0%, #084298 100%);
    border-color: #084298;
    color: #fff;
}
.mv-coords-use-ponto:disabled {
    opacity: 0.5;
    box-shadow: none;
}
.mv-coords-exif-dropdown {
    position: relative;
}
.mv-coords-exif-preset-btn {
    font-size: 0.8125rem;
    font-weight: 600;
    background: #f8f9fa;
    border-color: #ced4da;
    color: #212529;
}
.mv-coords-exif-preset-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}
.mv-coords-exif-caret {
    font-size: 0.65rem;
    margin-left: 0.15rem;
    opacity: 0.75;
}
.mv-coords-exif-preset-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.35rem);
    min-width: 240px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.35rem 0;
    z-index: 20;
}
.mv-coords-exif-preset-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    color: #212529;
    cursor: pointer;
}
.mv-coords-exif-preset-item:hover {
    background: #f1f3f5;
}
.mv-infos-field-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #343a40;
}
.mv-infos-section-chk-label {
    margin-bottom: 0;
}
.mv-infos-field-chk {
    margin-top: 0;
    flex-shrink: 0;
}
.mv-infos-bulk-banner {
    margin-bottom: 0.65rem;
    font-size: 0.8125rem;
}
.mv-infos-section-disabled .mv-coords-map,
.mv-infos-field-disabled {
    opacity: 0.55;
    pointer-events: none;
}
.mv-infos-section-disabled input:not(.mv-infos-field-chk),
.mv-infos-section-disabled textarea {
    background-color: #f8f9fa;
}
.mv-btn-primary {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
.mv-btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
    color: #fff;
}
.mv-info-edit-coords {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.45rem;
}

/* Dropdown Editar — girar, cortar, ângulo */
.mv-edit-dropdown {
    position: relative;
}
.mv-edit-caret {
    font-size: 0.65rem;
    opacity: 0.75;
}
.mv-edit-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 210px;
    background: rgba(15, 20, 25, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    padding: 0.35rem 0;
    z-index: 10815;
}
.mv-edit-menu[hidden] {
    display: none !important;
}
.mv-edit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: #e8eef4;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    cursor: pointer;
}
.mv-edit-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.mv-edit-item i {
    opacity: 0.85;
    width: 1.1rem;
}

/* Barras de corte e ângulo */
.mv-edit-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.45rem 0.85rem;
    background: rgba(15, 20, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.mv-edit-bar[hidden] {
    display: none !important;
}
.mv-edit-bar-hint {
    flex: 1;
    font-size: 0.8125rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.mv-edit-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.mv-angle-label {
    font-size: 0.8125rem;
    color: #94a3b8;
}
.mv-angle-slider {
    width: min(220px, 40vw);
    accent-color: #3b82f6;
}
.mv-angle-value {
    font-size: 0.8125rem;
    color: #cbd5e1;
    min-width: 2.75rem;
}

/* Overlay de seleção de corte */
.mv-root.mv-crop-active .mv-stage-inner {
    cursor: crosshair;
}
.mv-root.mv-crop-active .mv-nav {
    pointer-events: none;
    opacity: 0.35;
}
.mv-crop-overlay {
    position: absolute;
    inset: 0;
    z-index: 8;
    touch-action: none;
}
.mv-crop-box {
    position: absolute;
    border: 2px solid #fff;
    outline: 1px solid rgba(59, 130, 246, 0.95);
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    cursor: move;
    box-sizing: border-box;
}
.mv-crop-box[hidden] {
    display: none !important;
}
.mv-crop-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to right, rgba(255,255,255,0.35) 1px, transparent 1px) calc(33.33% - 0.5px) 0 / 33.33% 100% no-repeat,
        linear-gradient(to right, rgba(255,255,255,0.35) 1px, transparent 1px) calc(66.66% - 0.5px) 0 / 33.33% 100% no-repeat,
        linear-gradient(to bottom, rgba(255,255,255,0.35) 1px, transparent 1px) 0 calc(33.33% - 0.5px) / 100% 33.33% no-repeat,
        linear-gradient(to bottom, rgba(255,255,255,0.35) 1px, transparent 1px) 0 calc(66.66% - 0.5px) / 100% 33.33% no-repeat;
    opacity: 0.7;
}
.mv-crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #2563eb;
    border-radius: 2px;
    box-sizing: border-box;
    z-index: 2;
}
.mv-crop-handle-nw { left: -7px; top: -7px; cursor: nwse-resize; }
.mv-crop-handle-n  { left: 50%; top: -7px; margin-left: -6px; cursor: ns-resize; }
.mv-crop-handle-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.mv-crop-handle-e  { right: -7px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.mv-crop-handle-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.mv-crop-handle-s  { left: 50%; bottom: -7px; margin-left: -6px; cursor: ns-resize; }
.mv-crop-handle-sw { left: -7px; bottom: -7px; cursor: nesw-resize; }
.mv-crop-handle-w  { left: -7px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.mv-media-frame img.mv-media[style*="rotate"] {
    transition: transform 0.08s ease-out;
}

@media (max-width: 768px) {
    .mv-toolbar .mv-btn {
        min-height: 44px;
        padding: 0.45rem 0.65rem;
    }
    .mv-nav {
        width: 44px;
        height: 56px;
    }
    .mv-root.mv-info-open .mv-stage {
        flex-direction: column;
    }
    .mv-root.mv-info-open .mv-info-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-height: min(45vh, 320px);
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .mv-root.mv-info-open {
        --mv-info-sidebar-w: 100%;
    }
    .mv-root.mv-info-open .mv-nav-next {
        right: 0.5rem;
    }
    .mv-info-close {
        width: 44px;
        height: 44px;
    }
}
