/* ============================================
   CAKITU DESIGN TOKENS (docs/cakitu.branding.html)
   ============================================ */

:root {
    --background:       85 15%  8%;
    --foreground:       85 10% 90%;
    --card:             85 15% 11%;
    --card-foreground:  85 10% 90%;
    --card-border:      85 15% 18%;
    --primary:          85 35% 45%;
    --primary-foreground: 0 0% 100%;
    --primary-border:   85 35% 55%;
    --secondary:        85 15% 18%;
    --secondary-foreground: 85 10% 80%;
    --muted:            85 15% 15%;
    --muted-foreground: 85 10% 60%;
    --accent:           85 25% 18%;
    --accent-foreground:85 35% 55%;
    --destructive:       0 60% 45%;
    --destructive-foreground: 0 0% 100%;
    --border:           85 15% 18%;
    --input:            85 15% 22%;
    --ring:             85 35% 45%;
    --radius:           0.375rem;
    --font-sans:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading:     'Plus Jakarta Sans', sans-serif;

    --sidebar-background: 85 15% 10%;
    --sidebar-foreground: 85 10% 80%;
    --sidebar-primary:    85 35% 45%;
    --sidebar-accent:     85 15% 18%;
    --sidebar-border:     85 15% 15%;

    --elevate-1: rgba(255,255,255,0.05);
    --elevate-2: rgba(255,255,255,0.10);

    --brand-primary:  hsl(var(--primary));
    --brand-hover:    hsl(85 35% 52%);
    --brand-active:   hsl(var(--primary-border));
    --bg-primary:     hsl(var(--background));
    --bg-secondary:   hsl(var(--card));
    --bg-tertiary:    hsl(var(--muted));
    --bg-input:       hsl(var(--input));
    --bg-hover:       hsl(var(--accent));
    --border-color:   hsl(var(--border));
    --border-subtle:  hsl(85 15% 15%);
    --border-active:  hsl(var(--ring));
    --text-primary:   hsl(var(--foreground));
    --text-secondary: hsl(var(--muted-foreground));
    --text-muted:     hsl(85 10% 50%);
    --success:        hsl(142 45% 22%);
    --success-text:   hsl(142 50% 70%);
    --warning:        hsl(38 55% 25%);
    --warning-text:   hsl(38 90% 55%);
    --danger:         hsl(var(--destructive));
    --danger-text:    hsl(var(--destructive-foreground));
    --code-bg:        hsl(85 15%  6%);
    --code-border:    hsl(var(--border));
    --shadow:         0 1px 2px rgba(0,0,0,0.20);
    --shadow-lg:      0 4px 12px rgba(0,0,0,0.25);
    --btn-edge:       rgba(255,255,255,0.12);
    --btn-border:     hsl(85 12% 24%);

    --breadcrumb-chevron-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='9 18 15 12 9 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --breadcrumb-arrow-left-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cline x1='19' y1='12' x2='5' y2='12' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Cpolyline points='12 19 5 12 12 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

[data-theme="light"] {
    --background:       85 20% 98%;
    --foreground:       85 15% 15%;
    --card:              0  0% 100%;
    --card-foreground:  85 15% 15%;
    --card-border:      85 20% 92%;
    --primary:          85 45% 40%;
    --primary-foreground: 0 0% 100%;
    --primary-border:   85 45% 35%;
    --secondary:        85 20% 90%;
    --secondary-foreground: 85 20% 30%;
    --muted:            85 20% 92%;
    --muted-foreground: 85 15% 45%;
    --accent:           85 30% 90%;
    --accent-foreground:85 45% 40%;
    --destructive:       0 70% 50%;
    --destructive-foreground: 0 0% 100%;
    --border:           85 20% 90%;
    --input:            85 20% 85%;
    --ring:             85 45% 40%;
    --sidebar-background: 85 20% 96%;
    --sidebar-foreground: 85 15% 25%;
    --sidebar-primary:    85 45% 40%;
    --sidebar-accent:     85 20% 90%;
    --sidebar-border:     85 20% 88%;
    --elevate-1: rgba(0,0,0,0.04);
    --elevate-2: rgba(0,0,0,0.08);
    --btn-edge:   rgba(0,0,0,0.08);
    --btn-border: hsl(85 15% 85%);
    --brand-primary: hsl(var(--primary));
    --brand-hover:   hsl(85 45% 48%);
    --brand-active:  hsl(var(--primary-border));
    --bg-primary:    hsl(var(--background));
    --bg-secondary:  hsl(var(--card));
    --bg-tertiary:   hsl(var(--muted));
    --bg-input:      hsl(0 0% 100%);
    --bg-hover:      hsl(var(--accent));
    --border-color:  hsl(var(--border));
    --border-subtle: hsl(85 20% 88%);
    --border-active: hsl(var(--ring));
    --text-primary:  hsl(var(--foreground));
    --text-secondary:hsl(var(--muted-foreground));
    --text-muted:    hsl(85 15% 40%);
    --success:       hsl(142 45% 90%);
    --success-text:  hsl(142 55% 28%);
    --warning:       hsl(38 90% 94%);
    --warning-text:  hsl(38 80% 30%);
    --danger:        hsl(0 70% 96%);
    --danger-text:   hsl(0 70% 35%);
    --code-bg:       hsl(85 20% 96%);
    --code-border:   hsl(var(--border));
    --shadow:        0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg:     0 4px 12px rgba(0,0,0,0.10);
}

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

body {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "rlig" 1, "calt" 1;
    transition: background-color 0.15s, color 0.15s;
}

/* Iframe de renderização XLSX → PNG: começa pequeno e o JS ajusta ao tamanho real do bilhete. */
#xlsxImagemIframe {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1320px;
    height: 1px;
    border: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6,
.page-title,
.logo-text,
.section-title {
    font-family: var(--font-heading);
    letter-spacing: -0.025em;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */

.layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: 220px;
    background: hsl(var(--sidebar-background));
    border-right: 1px solid hsl(var(--sidebar-border));
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: background-color 0.15s, border-color 0.15s;
}

.sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-brand {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-brand-link {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    border-radius: calc(var(--radius) - 2px);
}

.sidebar-brand-link:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.logo-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
}

.logo-icon-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: hsl(var(--primary));
    box-shadow: 0 0 0 1px var(--btn-edge);
}

.logo-text {
    font-size: 15px;
    font-weight: 700;
    color: hsl(var(--foreground));
    letter-spacing: -0.3px;
    text-transform: lowercase;
    flex-shrink: 0;
    line-height: 1.2;
    transition: filter 0.15s ease;
}

.sidebar-brand-link:hover .logo-text {
    filter: brightness(1.07);
}

.logo-cakitu {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    font-family: var(--font-sans);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    padding-left: 2px;
}

.nav-section {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.nav-section:last-child {
    border-bottom: none;
}

.nav-title {
    padding: 0 16px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.nav-item {
    padding: 6px 16px 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 13px;
    transition: background-color 0.1s, color 0.1s;
    border-left: 2px solid transparent;
    text-transform: none;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-left: 4px solid var(--brand-primary);
    font-weight: 500;
    padding-left: 12px;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-item--parent {
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    border: none;
    background: transparent;
    margin: 0;
    justify-content: flex-start;
}

.nav-item--parent .nav-item-parent-label {
    flex: 1;
    min-width: 0;
}

.nav-item-chevron {
    width: 12px;
    height: 12px;
    margin-left: auto;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.65;
    transition: transform 0.2s ease;
}

#sidebarConvertersToggle[aria-expanded="true"] .nav-item-chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: flex;
    flex-direction: column;
    padding: 2px 0 6px 0;
}

.nav-submenu[hidden] {
    display: none !important;
}

.nav-subitem {
    padding-left: 36px !important;
    font-size: 12px !important;
    border-left-width: 2px !important;
}

.nav-subitem.active {
    padding-left: 34px !important;
    border-left-width: 4px !important;
}

/* Home (rota /) */
.geo-view[hidden] {
    display: none !important;
}

.geo-app-view.geo-app-view--enter {
    animation: geoViewIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes geoViewIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .geo-app-view.geo-app-view--enter {
        animation: none;
    }
}

.result-sublabel {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.45;
}

.geo-home-dash {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.geo-home-distribution-bar {
    display: flex;
    height: 14px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    margin-bottom: 14px;
}

.geo-home-seg {
    flex: 1;
    min-width: 0;
    transition: flex 0.35s ease, opacity 0.25s ease;
}

.geo-home-seg--maps {
    background: #5f7a46;
}

.geo-home-seg--kml {
    background: #3d6b8a;
}

.geo-home-seg--xlsx {
    background: #8a6b3d;
}


.geo-home-legend {
    list-style: none;
    margin: 0 0 12px 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.geo-home-legend strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-left: 4px;
}

.geo-home-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.geo-home-dot--maps {
    background: #5f7a46;
}

.geo-home-dot--kml {
    background: #3d6b8a;
}

.geo-home-dot--xlsx {
    background: #8a6b3d;
}

.geo-home-stat--total {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}

.geo-home-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.geo-home-tool-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.geo-home-tool-card:hover {
    border-color: var(--border-active);
}

.geo-home-tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.geo-home-tool-icon--maps {
    background: linear-gradient(135deg, #5f7a46, #7a9658);
}

.geo-home-tool-icon--kml {
    background: linear-gradient(135deg, #3d6b8a, #5a8fb0);
}

.geo-home-tool-icon--xlsx {
    background: linear-gradient(135deg, #8a6b3d, #b08a52);
}

.geo-home-tool-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    font-family: inherit;
}

.geo-home-tool-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.geo-home-tool-btn {
    align-self: flex-start;
    margin-top: 4px;
}

.geo-home-header {
    margin-bottom: 8px;
}

.geo-home-section {
    margin-top: 0;
}


.geo-home-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    padding: 20px;
}

.geo-home-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.geo-home-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 16px 0;
}

.geo-home-chart {
    border-radius: calc(var(--radius) * 0.75);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    padding: 12px;
    margin-bottom: 16px;
}

.geo-home-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 140px;
    color: var(--brand-primary);
}

.geo-home-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--border-color);
}

.geo-home-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.geo-home-stat-value {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.geo-home-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.geo-home-action {
    width: 100%;
    justify-content: center;
}

.nav-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s, border-color 0.15s;
}

.header-breadcrumb-row {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 0;
}

/* Breadcrumb (Schema.org BreadcrumbList) — padrão minimalista + tokens Cakitu */
.c-navigation-breadcrumbs {
    flex: 1;
    min-width: 0;
    font-family: var(--font-sans);
    font-size: 12px;
    line-height: 1.4;
}

.c-navigation-breadcrumbs__directory {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    text-transform: none;
}

.c-navigation-breadcrumbs__item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.c-navigation-breadcrumbs__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    touch-action: manipulation;
    border-radius: calc(var(--radius) - 2px);
    transition: filter 0.15s ease, color 0.15s ease;
}

.c-navigation-breadcrumbs__link:visited {
    color: var(--text-muted);
}

.c-navigation-breadcrumbs__link:hover {
    color: var(--text-muted);
    filter: brightness(1.12);
    text-decoration: none;
}

.c-navigation-breadcrumbs__link:focus {
    outline: none;
}

.c-navigation-breadcrumbs__link:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.c-navigation-breadcrumbs__current {
    color: var(--text-primary);
    font-weight: 500;
}

.o-inline-svg-icon {
    stroke: currentColor;
    fill: none;
}

.o-inline-svg-icon--baseline {
    position: relative;
    top: 0.125em;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.u-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.c-svg-sprite-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

@media (min-width: 501px) {
    .c-navigation-breadcrumbs__item:not(:last-child)::after {
        content: '';
        display: inline-block;
        width: 16px;
        height: 16px;
        margin: 0 8px;
        flex-shrink: 0;
        background-color: var(--text-muted);
        mask: var(--breadcrumb-chevron-mask) center / 16px 16px no-repeat;
        -webkit-mask: var(--breadcrumb-chevron-mask) center / 16px 16px no-repeat;
    }
}

@media (max-width: 500px) {
    .c-navigation-breadcrumbs__directory {
        font-size: 11px;
        gap: 0;
    }

    .c-navigation-breadcrumbs__item:not(:last-child)::after {
        margin: 0 6px;
    }
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============================================
   THEME SWITCHER
   ============================================ */

.theme-switcher {
    position: relative;
}

.theme-dropdown-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 4px 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    transition: background-color 0.1s, border-color 0.1s;
    display: flex;
    align-items: center;
    gap: 5px;
    width: auto;
    min-width: auto;
    justify-content: space-between;
    height: 26px;
}

.theme-dropdown-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
}

.theme-dropdown-btn.active {
    border-color: var(--border-active);
}

.theme-dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: hidden;
    color: var(--text-secondary);
}

.theme-switcher.open .theme-dropdown-content {
    display: block;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    transition: background-color 0.1s, color 0.1s, border-color 0.1s;
    border: none;
    border-left: 3px solid transparent;
    background: transparent;
    width: 100%;
    text-align: left;
    position: relative;
}

.theme-option:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.theme-option.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    border-left-color: var(--brand-primary);
}

.theme-option-icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

.theme-dropdown-content svg,
.theme-dropdown-content svg * {
    stroke: currentColor;
    fill: none;
}

.theme-current-icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

.theme-chevron {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.theme-switcher.open .theme-chevron {
    transform: rotate(180deg);
}

/* ============================================
   MOBILE TOGGLE
   ============================================ */

.mobile-toggle {
    display: none;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 6px 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    width: 30px;
    height: 30px;
    min-width: 30px;
    align-items: center;
    justify-content: center;
    transition: background-color 0.1s, border-color 0.1s;
}

.mobile-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
}

/* ============================================
   CONTENT AREA
   ============================================ */

.content {
    padding: 20px 24px 32px;
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}

.geo-page-section--wide {
    max-width: none;
}

.geo-form {
    max-width: none;
    width: 100%;
}

.geo-form--wide {
    max-width: none;
}

.geo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 4px;
}

.geo-field .converter-field-label,
.geo-field .input-label {
    margin-bottom: 0;
}

.geo-field .input,
.geo-field .geo-select,
.geo-field select.input {
    width: 100%;
    max-width: 100%;
}

.geo-field--xs {
    width: 100%;
    max-width: 11rem;
}

.geo-field--sm {
    width: 100%;
    max-width: 16rem;
}

.geo-field--md {
    width: 100%;
    max-width: 22rem;
}

.geo-field--lg {
    width: 100%;
    max-width: 32rem;
}

.geo-field--full {
    width: 100%;
    max-width: none;
}

.input-section.geo-form .converter-field-area,
.input-section.geo-form .xlsx-upload-area {
    width: 100%;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: none;
}

/* ============================================
   SECTION
   ============================================ */

.section {
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.section-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 5px 12px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.1s, border-color 0.1s, color 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    height: 26px;
    line-height: 1;
    width: auto;
    min-width: auto;
    box-sizing: border-box;
}

.btn-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.btn-primary {
    background: hsl(85 40% 40%);
    color: hsl(var(--primary-foreground));
    border: 1px solid hsl(85 40% 32%);
}

.btn-primary:hover:not(:disabled) {
    background: hsl(85 40% 46%);
    border-color: hsl(85 40% 38%);
    color: hsl(var(--primary-foreground));
}

[data-theme="light"] .btn-primary {
    background: hsl(85 48% 38%);
    border-color: hsl(85 48% 30%);
}

[data-theme="light"] .btn-primary:hover:not(:disabled) {
    background: hsl(85 48% 44%);
    border-color: hsl(85 48% 35%);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--btn-border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--btn-border);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-danger {
    background: hsl(0 62% 48%);
    color: hsl(var(--primary-foreground));
    border: 1px solid hsl(0 62% 40%);
}

.btn-danger:hover:not(:disabled) {
    background: hsl(0 62% 54%);
    border-color: hsl(0 62% 46%);
}

.btn-sm {
    padding: 3px 9px !important;
    font-size: 10px !important;
    height: 24px !important;
    gap: 4px !important;
    min-width: auto !important;
    width: auto !important;
    display: inline-flex !important;
}

.btn-xs {
    padding: 2px 8px !important;
    font-size: 10px !important;
    height: 22px !important;
    gap: 3px !important;
    min-width: auto !important;
    width: auto !important;
    display: inline-flex !important;
}

.btn-sm .btn-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn.loading .spinner {
    display: block !important;
}

.btn.loading .button-text {
    display: none;
}

.btn .spinner {
    display: none;
}

/* ============================================
   INPUTS
   ============================================ */

.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 10px;
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
    pointer-events: none;
}

.input {
    width: 100%;
    padding: 7px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 12px;
    transition: border-color 0.1s, background-color 0.1s;
    height: 30px;
    outline: none;
}

.input.has-icon {
    padding-left: 32px;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.2);
}

.input::placeholder {
    color: var(--text-muted);
}

.textarea {
    min-height: 80px;
    resize: vertical;
    padding-top: 8px;
    height: auto;
    font-family: 'Courier New', ui-monospace, monospace;
}

.input[type="file"] {
    cursor: pointer;
    padding: 10px 10px;
    min-height: 42px;
    line-height: 1.2;
}

.input[type="file"]::file-selector-button {
    padding: 6px 12px;
    margin-right: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 11px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s;
}

.xlsx-mapeamento-fieldset {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.xlsx-block {
    margin: 0;
    padding: 0;
}

.xlsx-block + .xlsx-block {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.xlsx-block-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.xlsx-block-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 14px 0;
    max-width: none;
}

.xlsx-optional-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    vertical-align: middle;
}

.xlsx-mapping-grid-min {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px 18px;
}

.xlsx-map-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.xlsx-map-col .input-label {
    margin-bottom: 0;
}

.xlsx-titles-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.xlsx-titles-head-text {
    flex: 1;
    min-width: 200px;
}

.xlsx-btn-titles-toggle {
    flex-shrink: 0;
    align-self: flex-start;
}

.xlsx-titles-panel {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.xlsx-titles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px 20px;
}

.xlsx-title-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.xlsx-title-field .input {
    max-width: 14rem;
}

.xlsx-title-field .input-label {
    margin-bottom: 0;
    font-size: 11px;
    color: var(--text-secondary);
}

.xlsx-title-input {
    background: var(--bg-input);
}

.xlsx-mapeamento-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 960px) {
    .xlsx-mapping-grid-min {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }

    .xlsx-titles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .xlsx-mapping-grid-min {
        grid-template-columns: 1fr;
    }

    .xlsx-titles-head {
        flex-direction: column;
        align-items: stretch;
    }

    .xlsx-btn-titles-toggle {
        width: 100%;
    }
}

.input[type="file"]::file-selector-button:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
}

/* ============================================
   TABS
   ============================================ */

.tabs-container {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs-container::-webkit-scrollbar {
    display: none;
}

.tab-button {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand-primary);
}

.hub-tabs {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    border-bottom: 1px solid var(--border-color);
}

.hub-tab {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.1s, border-color 0.1s;
    font-family: inherit;
}

.hub-tab:hover {
    color: var(--text-primary);
}

.hub-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand-primary);
}

.hub-pane[hidden] {
    display: none !important;
}

.page-header--hub {
    margin-bottom: 8px;
}

.geo-home {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: none;
}

.geo-home-hero {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.geo-home-eyebrow {
    margin: 0 0 6px 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.geo-home-lead {
    margin: 0 0 14px 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: none;
}

.geo-home-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.geo-home-metric {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.geo-home-metric strong,
.geo-home-metric span {
    color: var(--text-primary);
    font-weight: 600;
}

.geo-home-metric--total {
    border-color: hsl(var(--primary) / 0.35);
    background: hsl(var(--primary) / 0.08);
}

.geo-home-block__head {
    margin-bottom: 12px;
}

.geo-home-block__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.geo-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.geo-shortcut {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-left: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, border-left-color 0.15s;
}

.geo-shortcut:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-active);
    border-left-color: var(--brand-primary);
}

.geo-shortcut:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.25);
}

.geo-shortcut__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: calc(var(--radius) * 0.85);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.geo-shortcut:hover .geo-shortcut__icon {
    color: var(--brand-primary);
    border-color: hsl(var(--primary) / 0.35);
}

.geo-shortcut__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.geo-shortcut__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.geo-shortcut__desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.geo-shortcut__arrow {
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.15s, transform 0.15s;
}

.geo-shortcut:hover .geo-shortcut__arrow {
    opacity: 1;
    color: var(--brand-primary);
    transform: translateX(2px);
}

.geo-correcao-field {
    margin-bottom: 0;
}

.geo-correcao-field__label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.geo-correcao-field__label-row .converter-field-label {
    margin-bottom: 0;
}

.geo-correcao-field .geo-select {
    width: 100%;
    margin-top: 0;
}

.geo-field-note {
    margin: 8px 0 0 0;
    padding: 0;
    font-size: 11px;
    line-height: 1.55;
    color: var(--text-muted);
    border: none;
    background: none;
}

.geo-help-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    font-family: inherit;
    flex-shrink: 0;
}

.geo-help-btn:hover,
.geo-help-btn:focus-visible {
    color: var(--text-primary);
    border-color: var(--border-active);
    outline: none;
}

.geo-history-badge--correcoes {
    border-color: rgba(95, 122, 70, 0.35);
    color: #5f7a46;
}

.geo-history-panel {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.geo-history-panel--flush {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.geo-history-panel__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.geo-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
    gap: 24px;
    align-items: start;
    width: 100%;
}

.geo-page-grid__side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.geo-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
}

.geo-action-bar__msg {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.geo-action-bar__msg:empty {
    display: none;
}

.geo-action-bar__buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 960px) {
    .geo-page-grid {
        grid-template-columns: 1fr;
    }
}

.geo-history-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.geo-history-panel__title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.geo-history-panel__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.geo-history-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    overflow: auto;
    max-height: 420px;
}

/* Menu de ações (⋯) — painel em position:fixed via geo-actions-menu.js */
.geo-actions-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    vertical-align: middle;
}

.geo-actions-menu__trigger.btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    font-size: 0 !important;
    gap: 0 !important;
    color: var(--text-secondary);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.geo-actions-menu__trigger:hover,
.geo-actions-menu__trigger[aria-expanded="true"] {
    color: var(--text-primary);
    background: var(--bg-hover, rgba(255, 255, 255, 0.08));
}

.geo-actions-menu__icon {
    display: block;
    width: 14px;
    height: 14px;
}

.geo-actions-menu__panel {
    width: max-content;
    min-width: 0;
    max-width: min(220px, calc(100vw - 16px));
    padding: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.geo-actions-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}

.geo-actions-menu__item-icon {
    flex-shrink: 0;
    display: block;
    opacity: 0.9;
}

.geo-actions-menu__label {
    flex: 1;
    min-width: 0;
}

.geo-actions-menu__item--danger .geo-actions-menu__item-icon {
    opacity: 1;
}

.geo-actions-menu__item:hover:not(:disabled) {
    background: var(--bg-tertiary);
}

.geo-actions-menu__item:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.geo-actions-menu__item--danger {
    color: #f87171;
}

.geo-actions-menu__item--danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.12);
}

.result-section:has(.geo-actions-menu__trigger[aria-expanded="true"]) {
    position: relative;
    z-index: 2;
}

.geo-history-row:has(.geo-actions-menu__trigger[aria-expanded="true"]) {
    position: relative;
    z-index: 2;
}

.geo-history-table-wrap.is-empty .geo-history-table {
    display: none;
}

.geo-history-table-wrap:not(.is-empty) .geo-history-empty {
    display: none;
}

.geo-history-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 28px 16px;
    margin: 0;
}

.geo-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.geo-history-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-tertiary);
}

.geo-history-table th {
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.geo-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle, var(--border-color));
    vertical-align: middle;
    color: var(--text-secondary);
}

.geo-history-table tbody tr:last-child td {
    border-bottom: none;
}

.geo-history-row:hover td {
    background: var(--bg-tertiary);
}

.geo-history-table__actions-head,
.geo-history-table__actions {
    text-align: center;
    white-space: nowrap;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    padding-left: 6px !important;
    padding-right: 6px !important;
    box-sizing: border-box;
}

.geo-history-table__actions-head {
    letter-spacing: 0.02em;
}

.geo-history-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.geo-history-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.geo-history-badge--maps {
    border-color: rgba(95, 122, 70, 0.35);
    color: #5f7a46;
}

.geo-history-badge--kml {
    border-color: rgba(61, 107, 138, 0.35);
    color: #3d6b8a;
}

.geo-history-badge--xlsx {
    border-color: rgba(138, 107, 61, 0.35);
    color: #8a6b3d;
}

.geo-history-badge--correcoes {
    border-color: rgba(122, 95, 138, 0.35);
    color: #7a5f8a;
}

.geo-history-name-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s;
}

.geo-history-name-btn:hover {
    text-decoration-color: var(--accent-color, #5f7a46);
}

.geo-history-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.geo-history-name-text {
    font-weight: 600;
    color: var(--text-primary);
}

.geo-history-details,
.geo-history-date {
    font-variant-numeric: tabular-nums;
}

.history-xlsx-thumb--table {
    max-height: 40px;
    max-width: 64px;
}

.geo-history-table-wrap--home {
    max-height: 320px;
}

@media (max-width: 720px) {
    .geo-history-table thead {
        display: none;
    }

    .geo-history-row {
        display: block;
        border-bottom: 1px solid var(--border-color);
    }

    .geo-history-row td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 12px;
        border: none;
    }

    .geo-history-row td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .geo-history-table__actions {
        width: auto;
        min-width: 0;
        max-width: none;
        justify-content: center;
    }

    .geo-history-table__actions .geo-history-actions {
        justify-content: center;
    }
}

.geo-select {
    width: 100%;
}

.tabs-dropdown {
    display: none;
    width: 100%;
    margin-bottom: 20px;
}

.tabs-dropdown select {
    width: 100%;
    padding: 7px 10px;
    padding-right: 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.1s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238a919e' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

[data-theme="light"] .tabs-dropdown select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%233e4451' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
}

.tabs-dropdown select:focus {
    border-color: var(--border-active);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   RESULT SECTION
   ============================================ */

.result-section {
    display: none;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 24px;
    gap: 0;
    animation: slideInResult 250ms ease;
    overflow: visible;
}

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

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.result-title-group {
    flex: 1;
    min-width: 0;
}

.result-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.result-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.result-info-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    text-align: left;
    margin-bottom: 0;
}

.result-info-content {
    font-family: inherit;
    font-size: 12px;
    color: var(--text-primary);
    white-space: pre-line;
    line-height: 1.6;
    font-weight: 400;
}

/* ── Múltiplas rotas: banner + cards ─────────────────────────────── */

.geo-routes-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.geo-routes-list[hidden] { display: none !important; }

/* Faixa compacta de resumo */
.geo-routes-banner {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    background: color-mix(in srgb, var(--accent-color, #5f7a46) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-color, #5f7a46) 25%, transparent);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    align-self: flex-start;
}

.geo-routes-banner strong { color: var(--text-primary); }

.geo-routes-banner__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color, #5f7a46);
    flex-shrink: 0;
}

/* Card de rota individual */
.geo-route-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 9px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    animation: routeCardIn 220ms ease both;
    transition: background 120ms ease;
    overflow: visible;
    position: relative;
    z-index: 0;
}

.geo-route-card:has(.geo-actions-menu__trigger[aria-expanded="true"]) {
    z-index: 2;
}

.geo-route-card:hover { background: var(--bg-secondary); }

@keyframes routeCardIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Linha principal do card (badge + nome + ações) */
.geo-route-card__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Input readonly para exibir o link gerado */
.geo-route-link-input {
    width: 100%;
    padding: 5px 8px;
    font-family: ui-monospace, 'Courier New', monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) - 2px);
    box-sizing: border-box;
    cursor: text;
    outline: none;
    transition: border-color 120ms ease;
}

.geo-route-link-input:focus {
    border-color: var(--accent-color, #5f7a46);
}

.geo-route-card__index {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-color, #5f7a46);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.geo-route-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.geo-route-card__name {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.geo-route-card__meta {
    margin: 1px 0 0;
    font-size: 11px;
    color: var(--text-muted);
}

.geo-route-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.geo-route-copy.is-copied {
    background: color-mix(in srgb, #16a34a 12%, transparent);
    border-color: color-mix(in srgb, #16a34a 45%, transparent);
    color: #16a34a;
}

/* Cabeçalho limpo de cada resultado XLSX */
.xlsx-rota-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.xlsx-rota-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.xlsx-rota-result {
    border-top: 2px solid var(--accent-color, #5f7a46);
    padding-top: 4px;
}

#xlsxResults > .geo-routes-banner { margin-top: 14px; }

/* Link → KML: preview de rotas e ações */
.maps-kml-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.maps-kml-preview {
    margin-top: 14px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.maps-kml-preview-head {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.maps-kml-preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.maps-kml-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) - 2px);
}

.maps-kml-preview-index {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-color, #5f7a46);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.maps-kml-preview-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.maps-kml-preview-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.maps-kml-preview-url {
    font-size: 10px;
    color: var(--text-muted);
    font-family: ui-monospace, 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.maps-kml-tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 99px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.maps-kml-tag--short {
    background: color-mix(in srgb, var(--accent-color, #5f7a46) 10%, transparent);
    color: var(--accent-color, #5f7a46);
    border-color: color-mix(in srgb, var(--accent-color, #5f7a46) 25%, transparent);
}

/* Beta: ferramentas experimentais */
.geo-beta-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    border-radius: 4px;
    background: color-mix(in srgb, #c47a20 18%, transparent);
    color: #b86a10;
    border: 1px solid color-mix(in srgb, #c47a20 35%, transparent);
    vertical-align: middle;
}

.geo-beta-badge--title {
    font-size: 11px;
    margin-left: 8px;
}

.nav-item .geo-beta-badge {
    margin-left: auto;
}

.result-action-button.success,
.result-action-button.copied {
    background: var(--success);
    border-color: var(--success);
    color: var(--success-text);
}

/* ============================================
   FILE INFO SECTION
   ============================================ */

.file-info-section {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 20px;
    animation: slideInResult 250ms ease 100ms both;
}

.file-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-info-header svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

.file-info-content {
    padding: 12px;
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    word-break: break-word;
}

/* ============================================
   HISTORY SECTION
   ============================================ */

.history-section {
    margin-top: 40px;
}

.history-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.history-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 32px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.history-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px;
    transition: border-color 0.1s, background-color 0.1s;
}

.history-item:hover {
    border-color: var(--border-active);
    background: var(--bg-tertiary);
}

.history-item.history-item--xlsx {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.history-item.history-item--xlsx .history-item-content {
    flex: 1;
    min-width: 0;
}

.history-xlsx-thumb-btn {
    flex-shrink: 0;
    padding: 2px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    cursor: pointer;
    line-height: 0;
    transition: border-color 0.1s, background-color 0.1s;
}

.history-xlsx-thumb-btn:hover {
    border-color: var(--border-active);
    background: var(--bg-primary);
}

.history-xlsx-thumb {
    display: block;
    max-height: 72px;
    max-width: 118px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    background: #e2e8f0;
}

/* XLSX → imagem: duas zonas (geração / histórico) e prévia com abas */
.xlsx-page-section--history {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.xlsx-section-head {
    margin-bottom: 16px;
}

.xlsx-section-head .section-title {
    margin-bottom: 6px;
}

.xlsx-history-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

.xlsx-result-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    padding: 14px 16px 16px;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 0;
}

.xlsx-result-card:has(.geo-actions-menu__trigger[aria-expanded="true"]) {
    z-index: 2;
}

/* Resultado XLSX: grelha 2 colunas pelo tamanho do painel (#xlsxResults), não da janela inteira */
#xlsxResults {
    container-type: inline-size;
    container-name: xlsx-res;
}

.xlsx-result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    margin-top: 4px;
}

.xlsx-result-col--png,
.xlsx-result-col--excel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.xlsx-result-col--png .xlsx-result-viewport {
    margin-top: 8px;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 220px;
    max-height: min(68vh, 620px);
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #e2e8f0;
    box-sizing: border-box;
    display: flex;
    justify-content: stretch;
    align-items: stretch;
}

.xlsx-result-preview-shell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #e2e8f0;
    line-height: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.xlsx-result-main-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 120px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-muted);
}

.xlsx-result-main-loading[hidden] {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.xlsx-result-col--png .xlsx-result-main-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    object-fit: contain;
    vertical-align: top;
}

.xlsx-result-data-label {
    margin: 0 0 8px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.xlsx-result-data-wrap {
    flex: 1 1 auto;
    min-height: 220px;
    max-height: min(68vh, 620px);
    overflow: auto;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: var(--radius);
    background: var(--bg-primary, #fff);
    box-sizing: border-box;
}

.xlsx-result-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
    color: var(--text-primary, #0f172a);
    line-height: 1.45;
}

.xlsx-result-data-table th,
.xlsx-result-data-table td {
    border: 1px solid var(--border-color, #94a3b8);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

.xlsx-result-data-table th {
    background: var(--bg-tertiary, #e2e8f0);
    color: var(--text-primary, #0f172a);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
    z-index: 1;
    box-shadow: 0 1px 0 var(--border-color, #94a3b8);
}

.xlsx-result-data-table td {
    background: var(--bg-primary, #fff);
}

.xlsx-result-data-table tbody tr:nth-child(even) td {
    background: var(--bg-tertiary, #f1f5f9);
}

@container xlsx-res (max-width: 640px) {
    .xlsx-result-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .xlsx-result-layout {
        grid-template-columns: 1fr;
    }
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.history-name {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
    margin-right: 8px;
    font-size: 12px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-name:hover {
    color: var(--brand-primary);
}

.history-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.history-download-button {
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.history-action-button {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.1s, border-color 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0;
}

.history-url-preview {
    font-size: 11px;
    color: var(--text-muted);
    word-break: break-word;
    line-height: 1.4;
    margin: 4px 0;
}

.history-download-section {
    display: none;
}

.history-download-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-active);
    color: var(--text-primary);
}

.history-download-button.copied {
    background: var(--success);
    border-color: var(--success);
    color: var(--success-text);
}

.history-delete-button:hover {
    background: hsl(0 62% 48%);
    border-color: hsl(0 62% 40%);
    color: hsl(var(--primary-foreground));
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    transition: background-color 0.15s, border-color 0.15s;
}

/* ============================================
   CODE BLOCK
   ============================================ */

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius);
    padding: 12px;
    overflow-x: auto;
    margin: 16px 0;
}

.code-block code {
    font-family: 'Courier New', ui-monospace, monospace;
    font-size: 11px;
    color: var(--text-primary);
    line-height: 1.6;
    white-space: pre;
}

/* ============================================
   SCROLLBAR
   ============================================ */

.history-list::-webkit-scrollbar,
.file-info-content::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track,
.file-info-content::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.history-list::-webkit-scrollbar-thumb,
.file-info-content::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius);
}

.history-list::-webkit-scrollbar-thumb:hover,
.file-info-content::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-active);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .content {
        padding: 16px;
    }

    .tabs-container {
        display: none;
    }

    .tabs-dropdown {
        display: block;
    }

    .history-list {
        max-height: 50vh;
    }
}

/* ============================================
   SCRAPER VIEW — embed integrado (altura viewport)
   ============================================ */

body.geo-scraper-embed-active .content {
    padding-bottom: 24px;
    overflow: visible;
}

body.geo-scraper-embed-active .geo-scraper-section.section {
    margin-bottom: 0;
}

body.geo-scraper-embed-active #page-scraper {
    margin-bottom: 16px;
    padding-bottom: 10px;
}

body.geo-scraper-embed-active .main-content {
    overflow: visible;
}

.geo-scraper-section {
    width: 100%;
    max-width: none;
}

.geo-scraper-controls {
    width: 100%;
    max-width: 22rem;
    margin-bottom: 12px;
}

.geo-scraper-field {
    max-width: none;
}

@keyframes geo-scraper-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.geo-scraper-workspace {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 4px;
    animation: geo-scraper-fade-in 0.25s ease;
}

/* [hidden] sozinho perde para display:flex acima — força esconder em "Nenhuma" */
.geo-scraper-workspace[hidden] {
    display: none !important;
}

.geo-scraper-loading[hidden] {
    display: none !important;
}

.geo-scraper-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    background: var(--bg-secondary);
}

.geo-scraper-loading__title {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.geo-scraper-loading__hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 280px;
    line-height: 1.5;
}

/* ── loader NexusGen (padrão branding euoryan) ── */
.geo-pl {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
}

.geo-pl__ring {
    fill: none;
    stroke-width: 20;
    stroke-dasharray: 0 660;
    stroke-linecap: round;
    animation: geo-pl-a 2s linear infinite;
}

.geo-pl__ring--a { stroke: hsl(var(--primary) / 0.45); }
.geo-pl__ring--b { stroke: hsl(var(--primary));          animation-name: geo-pl-b; }
.geo-pl__ring--c { stroke: hsl(var(--muted-foreground) / 0.5); animation-name: geo-pl-c; }
.geo-pl__ring--d { stroke: hsl(var(--primary) / 0.75);   animation-name: geo-pl-d; }

@keyframes geo-pl-a {
    from,4%   { stroke-dasharray:0 660;  stroke-width:20; stroke-dashoffset:-330; }
    12%       { stroke-dasharray:60 600; stroke-width:30; stroke-dashoffset:-335; }
    32%       { stroke-dasharray:60 600; stroke-width:30; stroke-dashoffset:-595; }
    40%,54%   { stroke-dasharray:0 660;  stroke-width:20; stroke-dashoffset:-660; }
    62%       { stroke-dasharray:60 600; stroke-width:30; stroke-dashoffset:-665; }
    82%       { stroke-dasharray:60 600; stroke-width:30; stroke-dashoffset:-925; }
    90%,to    { stroke-dasharray:0 660;  stroke-width:20; stroke-dashoffset:-990; }
}
@keyframes geo-pl-b {
    from,12%  { stroke-dasharray:0 220;  stroke-width:20; stroke-dashoffset:-110; }
    20%       { stroke-dasharray:20 200; stroke-width:30; stroke-dashoffset:-115; }
    40%       { stroke-dasharray:20 200; stroke-width:30; stroke-dashoffset:-195; }
    48%,62%   { stroke-dasharray:0 220;  stroke-width:20; stroke-dashoffset:-220; }
    70%       { stroke-dasharray:20 200; stroke-width:30; stroke-dashoffset:-225; }
    90%       { stroke-dasharray:20 200; stroke-width:30; stroke-dashoffset:-305; }
    98%,to    { stroke-dasharray:0 220;  stroke-width:20; stroke-dashoffset:-330; }
}
@keyframes geo-pl-c {
    from      { stroke-dasharray:0 440;  stroke-width:20; stroke-dashoffset:0;    }
    8%        { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-5;   }
    28%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-175; }
    36%,58%   { stroke-dasharray:0 440;  stroke-width:20; stroke-dashoffset:-220; }
    66%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-225; }
    86%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-395; }
    94%,to    { stroke-dasharray:0 440;  stroke-width:20; stroke-dashoffset:-440; }
}
@keyframes geo-pl-d {
    from,8%   { stroke-dasharray:0 440;  stroke-width:20; stroke-dashoffset:0;    }
    16%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-5;   }
    36%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-175; }
    44%,50%   { stroke-dasharray:0 440;  stroke-width:20; stroke-dashoffset:-220; }
    58%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-225; }
    78%       { stroke-dasharray:40 400; stroke-width:30; stroke-dashoffset:-395; }
    86%,to    { stroke-dasharray:0 440;  stroke-width:20; stroke-dashoffset:-440; }
}

/* mantido para compatibilidade com outros usos */
@keyframes geo-spin {
    to { transform: rotate(360deg); }
}
.geo-scraper-spinner-icon {
    stroke: hsl(var(--primary));
    animation: geo-spin 0.9s linear infinite;
}

@media (max-width: 768px) {
    .geo-scraper-controls {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .motor-shell {
        border-radius: calc(var(--radius) + 1px);
    }
}

/* ============================================
   UTILITIES
   ============================================ */

.hidden {
    display: none !important;
}

.error {
    color: var(--danger-text) !important;
}

.input-error {
    border-color: var(--danger-text) !important;
}

*:focus {
    outline: none;
}

.focus-visible:focus-visible {
    outline: 2px solid var(--border-active);
    outline-offset: 2px;
}
