/* Main CSS for OpenCities */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f5fb;
    color: #0f172a;
    line-height: 1.5;
}

.shell {
    max-width: 930px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem;
}

header.site-header,
header.global-header {
    padding: 0.75rem 1.5rem 0.5rem;
    background: #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
}

.header-inner {
    max-width: 930px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: #e2e8f0;
}

.header-logo img {
    height: 32px;
    width: auto;
    display: block;
}

.btn-login,
.btn-primary-pill {
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    border: 1px solid #1d4ed8;
    background: #1d4ed8;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover,
.btn-primary-pill:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.btn-outline-red {
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.8rem;
    border: 1px solid rgba(185, 28, 28, 0.35);
    background: #ffffff;
    color: #b91c1c;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.card h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

ul.city-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.35rem;
}

ul.city-list li a {
    text-decoration: none;
    color: #1d4ed8;
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

ul.city-list li a:hover {
    text-decoration: underline;
    background: #f8fafc;
}

.city-pop {
    font-weight: 600;
    color: #16a34a;
}

.empty { color: #64748b; font-size: 0.9rem; }

.alert { padding: 0.75rem 1rem; border-radius: 0.5rem; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-warning { background: #fef3c7; border: 1px solid #facc15; color: #854d0e; }

.hero {
    margin: 1rem 0 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    position: relative;
}

.hero-inner { position: relative; min-height: clamp(8rem, 16vh, 12rem); background-size: cover; background-position: center; }

.hero-floating-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 320px;
    max-width: calc(100% - 2rem);
    z-index: 9999;
}

/* Controlar z-index de elementos do Leaflet */
#city-map-banner,
#city-map-banner * {
    z-index: 1 !important;
}

#city-map-banner .leaflet-pane,
#city-map-banner .leaflet-tile-pane,
#city-map-banner .leaflet-overlay-pane,
#city-map-banner .leaflet-shadow-pane,
#city-map-banner .leaflet-marker-pane,
#city-map-banner .leaflet-tooltip-pane,
#city-map-banner .leaflet-popup-pane,
#city-map-banner .leaflet-control-container,
#city-map-banner .leaflet-top,
#city-map-banner .leaflet-bottom,
#city-map-banner .leaflet-left,
#city-map-banner .leaflet-right,
#city-map-banner .leaflet-control,
#city-map-banner .leaflet-control-attribution,
#city-map-banner .leaflet-control-layers {
    z-index: 1 !important;
}

.hero-city-card {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: rgba(255,255,255,0.96);
    color: #0f172a;
    padding: 0.4rem 1rem;
    border-radius: 0.9rem;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 12px 30px rgba(15,23,42,0.25);
}

.dashboard-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.mayor-card { position: relative; padding-top: 2.2rem; min-height: 260px; }
.mayor-card::before {
    content: 'Prefeito(a)';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1.8rem;
    padding: 0.25rem 1rem;
    border-radius: 0.9rem 0.9rem 0 0;
    background: #064e3b;
    color: #f9fafb;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}
.mayor-card .mayor-widget { display: flex; gap: 0.8rem; align-items: flex-start; }
.mayor-card .mayor-photo {
    width: 190px; height: 190px; border-radius: 1rem;
    background-size: cover; background-position: center; background-color: #e5e7eb;
    flex-shrink: 0; border: 2px solid rgba(255,255,255,0.75);
    box-shadow: 0 12px 28px rgba(15,49,66,0.35);
}
.mayor-card .mayor-meta { font-size: 0.8rem; color: #6b7280; }

.impostometro-card {
    background: #0f172a;
    color: #f8fafc;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.4rem 1.2rem 3.5rem;
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 45px rgba(15,23,42,0.25);
    position: relative;
    overflow: hidden;
}
.impostometro-card h3 { margin: 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: rgba(248,250,252,0.7); }
.impostometro-value { font-size: 1.8rem; font-weight: 700; color: #dc2626; word-break: break-word; }
.impostometro-details { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: rgba(248,250,252,0.85); }
.impostometro-details span { display: block; }
.impostometro-footer {
    position: absolute; left: 0; right: 0; bottom: 0; height: 3.2rem;
    display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem;
    padding: 0 1.4rem; border-radius: 0 0 1rem 1rem; background: #f8fafc;
    color: #0f172a; text-decoration: none; font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.impostometro-logo { height: 32px; width: auto; display: block; }

.info-row {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.info-card.social-widget.social-card {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}
.info-card.social-widget.social-card .card-title.social-title {
    margin: 0; padding: 0.8rem 1rem; border-radius: 1rem 1rem 0 0;
    background: #064e3b; color: #f9fafb; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.info-card.social-widget.social-card .card-body { padding: 1rem 1.3rem 1.1rem; background: #f9fafb; }
.info-card.social-widget.social-card .stat-grid { margin-top: 0.5rem; }

.finance-term-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.info-card.social-widget.finance-card {
    background: #ffffff;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 45px rgba(15,23,42,0.18);
}
.info-card.social-widget.finance-card .card-title.social-title {
    margin: 0; padding: 0.8rem 1rem; border-radius: 0.9rem 0.9rem 0 0;
    background: #064e3b; color: #f9fafb; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.info-card.social-widget.finance-card .card-body { padding: 1rem 1.2rem 1.1rem; background: #ecfdf3; }
.info-card.social-widget.finance-card .term-bar {
    width: 100%; height: 36px; border-radius: 999px; position: relative; overflow: hidden; box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.15);
    background-image: linear-gradient(90deg, #dc2626 0%, #f97316 30%, #facc15 55%, #eab308 80%, #16a34a 100%) !important;
    background-repeat: no-repeat !important; background-size: 100% 100% !important;
}
.info-card.social-widget.finance-card .term-bar::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: var(--term-score, 0%); background: #e5e7eb !important; }
.info-card.social-widget.finance-card .overview-card-body { padding: 1.4rem 1.5rem 1.6rem; background: #ecfdf3; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.info-card.social-widget.finance-card .term-label { font-size: 0.95rem; color: rgba(15, 23, 42, 0.8); text-align: center; }
.info-card.social-widget.finance-card .term-score { font-size: 2.4rem; font-weight: 700; color: #0f172a; }
.info-card.social-widget.finance-card .overview-card-footer { padding: 0 1.5rem 1.4rem; }
.info-card.social-widget.finance-card .criteria-grid { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 1rem 1rem; }
.info-card.social-widget.finance-card .criteria-item { display: grid; grid-template-columns: minmax(0, 140px) 1fr auto; align-items: center; gap: 1rem; font-size: 0.85rem; }
.info-card.social-widget.finance-card .criteria-label { color: #0f172a; font-weight: 500; }
.info-card.social-widget.finance-card .criteria-bar {
    width: 100%; height: 10px; border-radius: 999px; position: relative; overflow: hidden;
    background-image: linear-gradient(90deg, #dc2626 0%, #f97316 30%, #facc15 55%, #eab308 80%, #16a34a 100%) !important;
    background-repeat: no-repeat !important; background-size: 100% 100% !important;
}
.info-card.social-widget.finance-card .criteria-bar::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: var(--term-score, 0%); background: #e5e7eb !important; }
.info-card.social-widget.finance-card .criteria-score { font-weight: 600; color: #0f172a; white-space: nowrap; }

.termometer-card { margin-top: 1rem; border-radius: 0.9rem; border: 1px solid #e2e8f0; background: #ffffff; box-shadow: 0 20px 45px rgba(15,23,42,0.18); padding: 1.1rem 1.2rem; }
.termometer-title { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; color: #475569; margin: 0 0 0.4rem; }
.termometer-score { font-size: 1.4rem; font-weight: 600; color: #0f172a; }
.termometer-bar-wrapper { margin-top: 0.5rem; width: 100%; }
.termometer-bar { width: 100%; height: 36px; border-radius: 999px; position: relative; margin: 0.8rem 0; overflow: hidden; box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.15); background-image: linear-gradient(90deg, #dc2626 0%, #f97316 30%, #facc15 55%, #eab308 80%, #16a34a 100%) !important; background-repeat: no-repeat !important; background-size: 100% 100% !important; }
.termometer-bar::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: var(--term-score, 0%); background: #e5e7eb !important; }
.stat-grid { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.8rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.stat:last-child { border-bottom: none; }
.stat-label-inline { color: #0f172a; font-weight: 500; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value-inline { flex-shrink: 0; font-weight: 600; color: #16a34a; }
.termometer-card .stat-grid { gap: 0.5rem; }
.termometer-card .stat { align-items: flex-start; }
.stat-bar { width: 100%; height: 18px; border-radius: 999px; position: relative; overflow: hidden; margin: 0.35rem 0 0; background-image: linear-gradient(90deg, #dc2626 0%, #f97316 30%, #facc15 55%, #eab308 80%, #16a34a 100%) !important; background-repeat: no-repeat !important; background-size: 100% 100% !important; }
.stat-bar::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: var(--term-score, 0%); background: #e5e7eb !important; }

footer.site-footer { margin-top: 2rem; padding: 1rem 1.5rem; background: #e5e7eb; border-top: 1px solid #cbd5e1; font-size: 0.85rem; color: #4b5563; }
footer.site-footer .footer-inner { max-width: 930px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* Ranking Cards Styles */
.ranking-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.population-sub-card {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}

.card-header .header-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.card-header.red { background: #fef2f2; color: #dc2626; }
.card-header.blue { background: #eff6ff; color: #2563eb; }
.card-header.green { background: #f0fdf4; color: #16a34a; }
.card-header.pink { background: #fdf2f8; color: #db2777; }
.card-header.orange { background: #fff7ed; color: #f97316; }
.card-header.indigo { background: #eef2ff; color: #4f46e5; }
.card-header.yellow { background: #fefce8; color: #ca8a04; }

.card-body {
    padding: 0.75rem 1rem;
}

.metric-card {
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.1);
    border: 1px solid #e2e8f0;
}

.metric-card .metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.metric-card .metric-header .title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.metric-card .metric-header .brazil-value {
    font-size: 0.8rem;
    color: #64748b;
}

.metric-card .metric-header .city-access-btn {
    font-size: 0.75rem;
    color: #2563eb;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border: 1px solid #2563eb;
    border-radius: 0.375rem;
}

.metric-card .metric-header .city-access-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Vereadores Floating Card Styles */
.vereadores-floating-card {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    border: 1px solid #e2e8f0;
}

.vf-heading {
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.vf-heading h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0f172a;
}

.vf-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vf-item {
    margin: 0;
}

.vf-grid {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
}

.vf-rank {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6b7280;
    min-width: 2rem;
}

.vf-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vf-stars-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.vf-stars {
    display: flex;
    gap: 0.1rem;
}

.vf-stars img {
    display: block;
}

.vf-score {
    font-size: 0.85rem;
    font-weight: 700;
    color: #16a34a;
    min-width: 2rem;
    text-align: right;
}

/* Menu Universal Styles */
.universal-menu {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05);
}

.menu-inner {
    max-width: 930px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.menu-link {
    text-decoration: none;
    color: #0f172a;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-link:hover {
    background: #e2e8f0;
    color: #1d4ed8;
}


.hero-inner {
    max-width: 930px;
    margin: 0 auto;
    width: 100%;
}

.hero-inner > div {
    width: 100%;
}

.hero-inner .menu-inner {
    max-width: 930px;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .shell { padding: 1.25rem 1rem; }
    .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .info-row { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .finance-term-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .mayor-card .mayor-widget { flex-direction: column; align-items: center; text-align: center; }
    .mayor-card .mayor-photo { width: 160px; height: 160px; }
}

/* Cache bust: 2026-01-25 18:55:34 */
