* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, sans-serif; background: #eef1f5; color: #222; }
a { color: #062a2e; }
.topbar { background: #062a2e; color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.topbar nav a { color: #fff; text-decoration: none; opacity: .9; white-space: nowrap; }
.topbar nav a:hover { opacity: 1; text-decoration: underline; }
.wrap { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.head-row { display: flex; justify-content: space-between; align-items: center; }
.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.login { max-width: 380px; margin: 60px auto; }
label { display: block; font-weight: 600; margin-bottom: 12px; font-size: .9rem; }
input[type=text], input:not([type]), input[type=password], input[type=number], input[type=email], input[type=tel], input[type=url], input[type=date] { width: 100%; padding: 10px; border: 1px solid #ccd; border-radius: 6px; font: inherit; margin-top: 4px; font-weight: normal; }
.btn { background: #0a8f1a; color: #062a2e; border: 0; padding: 10px 20px; border-radius: 6px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.05); }
.alert { background: #e6f4ea; border: 1px solid #a6d8b4; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.alert.error { background: #fdecea; border-color: #f5b5ae; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; font-size: .92rem; }
th { background: #f7f8fa; }
.actions { white-space: nowrap; }
.actions > * { display: inline-block; margin-right: 10px; vertical-align: middle; }
.actions form { margin: 0; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; }
.danger { color: #c0392b; }
.tag { padding: 2px 8px; border-radius: 10px; font-size: .8rem; }
.tag.ok { background: #e6f4ea; color: #1e7e34; }
.tag.off { background: #eee; color: #666; }
.grid { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 16px; }
.checks { display: flex; gap: 24px; margin-bottom: 12px; }
.checks label { font-weight: normal; }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; background: #f7f8fa; border: 1px solid #ccd; border-bottom: 0; border-radius: 6px 6px 0 0; padding: 6px; }
.toolbar button { background: #fff; border: 1px solid #ccd; border-radius: 4px; padding: 5px 9px; cursor: pointer; font-size: .85rem; }
.toolbar button:hover, .toolbar button.on { background: #062a2e; color: #fff; }
.toolbar .sep { width: 1px; background: #ccd; margin: 0 4px; }
.editor, .editor-html { width: 100%; min-height: 380px; border: 1px solid #ccd; border-radius: 0 0 6px 6px; padding: 16px; background: #fff; line-height: 1.6; overflow: auto; }
.editor:focus, .editor-html:focus { outline: 2px solid #0a8f1a; }
.editor img { max-width: 100%; }
.editor-html { font-family: Consolas, monospace; font-size: .85rem; }
.form-actions { margin-top: 16px; display: flex; gap: 16px; align-items: center; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } table { font-size: .8rem; } }
.admin-brand { display: flex; align-items: center; gap: 10px; }
.admin-brand img { width: 48px; height: auto; }
.btn { color: #fff; }
.login h1 { text-align: center; }

/* Filiações */
select, textarea { width: 100%; padding: 10px; border: 1px solid #ccd; border-radius: 6px; font: inherit; margin-top: 4px; font-weight: normal; }
.badge { background: #e53935; color: #fff; border-radius: 10px; padding: 1px 7px; font-size: .75rem; font-weight: 700; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: 20px; background: #fff; text-decoration: none; border: 1px solid #dde; font-size: .9rem; }
.tabs a.on { background: #062a2e; color: #fff; border-color: #062a2e; }
.tabs a b { opacity: .7; margin-left: 4px; }
.tabs .search { margin-left: auto; min-width: 260px; }
.tabs .search input { margin: 0; }
tr.is-new td { background: #fffbe6; }
.tag.st-nova { background: #fff3cd; color: #8a6d00; }
.tag.st-analise { background: #e3f2fd; color: #1565c0; }
.tag.st-aprovada { background: #e6f4ea; color: #1e7e34; }
.tag.st-recusada { background: #fdecea; color: #b71c1c; }
.empty { color: #777; text-align: center; padding: 30px; }
.row-actions { display: flex; gap: 16px; align-items: center; }
.ficha-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.ficha-grid .card + .card { margin-top: 16px; }
.ficha-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #0a8f1a; padding-bottom: 12px; margin-bottom: 8px; }
.ficha-head img { width: 76px; }
.ficha-head small { color: #666; }
table.dados th { width: 200px; background: #eef7f8; color: #0b6470; }
.muted { color: #aaa; }
.btn-out { display: inline-block; border: 1px solid #062a2e; color: #062a2e; padding: 7px 14px; border-radius: 6px; text-decoration: none; margin: 4px 6px 0 0; }
.contato h3, .ficha-grid h3 { margin-top: 0; }
.print-only { display: none; }
.assinaturas { display: none; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 70px; text-align: center; }
.assinaturas div { border-top: 1px solid #333; padding-top: 6px; font-size: .9rem; }
@media (max-width: 900px) { .ficha-grid { grid-template-columns: 1fr; } .tabs .search { margin-left: 0; width: 100%; } }
@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
    .wrap { margin: 0; max-width: none; }
    .ficha-grid { display: block; }
    .card { box-shadow: none; padding: 0; }
    .assinaturas.print-only { display: grid; }
}

/* Slides */
.hint { color: #667; font-size: .88rem; }
.thumb { width: 160px; height: 50px; object-fit: cover; border-radius: 4px; display: block; }
.thumb-empty { background: linear-gradient(120deg, #062a2e, #0b6470); color: #cde; font-size: .75rem; display: grid; place-items: center; }
.tag-btn { border: 0; cursor: pointer; font: inherit; font-size: .8rem; }
label.inline { display: flex; gap: 8px; align-items: center; font-weight: normal; }
label small { font-weight: normal; color: #777; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type=file] { display: block; margin-top: 6px; font-weight: normal; }
.slide-preview { aspect-ratio: 1920 / 600; border-radius: 8px; background: linear-gradient(120deg, #062a2e, #0b6470) center / cover no-repeat;
    position: relative; display: flex; align-items: center; padding: 0 5%; color: #fff; overflow: hidden; }
.slide-preview::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,28,31,.78), rgba(4,28,31,.35) 55%, transparent 80%); }
.slide-preview > div { position: relative; max-width: 55%; }
.slide-preview strong { font-size: 1.6rem; display: block; line-height: 1.2; }
.slide-preview p { margin: 6px 0 10px; opacity: .95; }
.pv-btn { background: #0a8f1a; padding: 6px 16px; border-radius: 20px; font-weight: 700; font-size: .85rem; display: inline-block; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } .slide-preview > div { max-width: 100%; } .slide-preview strong { font-size: 1rem; } }

/* Galeria */
.new-album { display: grid; grid-template-columns: 2fr 1fr auto; gap: 16px; align-items: end; margin-bottom: 20px; }
.new-album label { margin: 0; }
.admin-albuns { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.admin-album { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: flex; flex-direction: column; }
.admin-album .cover { aspect-ratio: 4/3; background: linear-gradient(120deg, #062a2e, #0b6470); display: grid; place-items: center; color: #bcd; text-decoration: none; }
.admin-album .cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-album .meta { padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.admin-album .meta small { color: #667; }
.admin-album .actions { padding: 8px 14px 14px; margin-top: auto; }
.album-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.album-layout .card + .card { margin-top: 20px; }
.album-settings { position: sticky; top: 16px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px dashed #9cc7cd; border-radius: 10px; padding: 34px 16px;
    text-align: center; cursor: pointer; background: #f4fbfc; transition: background .2s, border-color .2s; font-weight: normal; margin: 0; }
.dropzone strong { font-size: 1.1rem; color: #062a2e; }
.dropzone span { color: #667; font-size: .9rem; }
.dropzone:hover, .dropzone.over { background: #e3f6f8; border-color: #0a8f1a; }
.upload-progress { margin-top: 14px; }
.upload-progress .bar { height: 10px; background: #e6eef0; border-radius: 5px; overflow: hidden; }
.upload-progress .bar span { display: block; height: 100%; width: 0; background: #0a8f1a; transition: width .3s; }
.upload-progress p { margin: 8px 0 0; font-weight: 600; }
.upload-errors { color: #b71c1c; font-size: .85rem; margin: 6px 0 0; padding-left: 18px; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.admin-photo { position: relative; background: #f6f8f9; border-radius: 6px; overflow: hidden; border: 3px solid transparent; cursor: grab; }
.admin-photo.is-cover { border-color: #f2b705; }
.admin-photo.dragging { opacity: .4; }
.admin-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; pointer-events: none; }
.admin-photo .tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.admin-photo .tools button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); cursor: pointer; font-size: .9rem; }
.admin-photo .tools .b-capa { color: #999; }
.admin-photo.is-cover .tools .b-capa { color: #e0a800; }
.admin-photo .legenda { width: 100%; border: 0; border-top: 1px solid #e3e8ea; padding: 7px 8px; font: inherit; font-size: .8rem; background: #fff; margin: 0; border-radius: 0; }
.admin-photo .legenda.saved { background: #e6f4ea; }
@media (max-width: 900px) { .album-layout, .new-album { grid-template-columns: 1fr; } .album-settings { position: static; } }
input[type=file][hidden] { display: none; }

/* Vídeos */
.admin-videos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.admin-videos .admin-photo img { aspect-ratio: 16 / 9; }
.admin-videos .admin-photo a { display: block; }
.video-cover img { aspect-ratio: 4 / 3; }
.link-preview { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 8px; }
.link-preview img { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; }
.link-preview .bad { background: #fdecea; color: #b71c1c; font-size: .75rem; padding: 4px 8px; border-radius: 4px; align-self: center; }

/* Dados da empresa */
.empresa-form .card { margin-bottom: 18px; }
.empresa-form h3 { margin: 0 0 14px; color: #062a2e; border-bottom: 2px solid #e3eef0; padding-bottom: 8px; }
.empresa-form label small { display: block; margin-top: 4px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-end { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 16px; }
.grid-end .c2 { grid-column: span 2; } .grid-end .c3 { grid-column: span 3; } .grid-end .c4 { grid-column: span 4; } .grid-end .c7 { grid-column: span 7; }
.field-error { display: block; color: #c62828; font-size: .82rem; font-weight: 600; margin-top: 4px; }
.req { color: #c62828; }
.save-bar { position: sticky; bottom: 0; background: rgba(238,241,245,.95); padding: 12px 0; text-align: right; }
@media (max-width: 800px) { .grid3, .grid-end { grid-template-columns: 1fr; } .grid-end > label { grid-column: auto !important; } }

.grid-end .c5 { grid-column: span 5; } .grid-end .c6 { grid-column: span 6; }
.smtp { margin-top: 10px; border: 1px solid #dde6e8; border-radius: 8px; padding: 10px 14px; background: #fafcfc; }
.smtp summary { cursor: pointer; font-weight: 700; color: #062a2e; }
.smtp[open] summary { margin-bottom: 8px; }
.save-bar { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
button.btn-out { background: #fff; cursor: pointer; font: inherit; }
.email-status p { margin: 0; font-size: .9rem; }
.email-status.ok { border-left: 4px solid #1e7e34; }
.email-status.falha { border-left: 4px solid #c62828; }
.email-status h3 { margin-top: 0; }

/* Estatísticas */
.online { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: #2f3d40; background: #fff; padding: 6px 14px; border-radius: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #1e9e45; box-shadow: 0 0 0 0 rgba(30,158,69,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(30,158,69,0); } 100% { box-shadow: 0 0 0 0 rgba(30,158,69,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.periodos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.periodos a { padding: 7px 14px; border-radius: 20px; background: #fff; border: 1px solid #dde4e6; text-decoration: none; font-size: .9rem; color: #2f3d40; }
.periodos a:hover { background: #f2f7f8; }
.periodos a.on { background: #062a2e; border-color: #062a2e; color: #fff; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.tile { background: #fff; border-radius: 8px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 4px; }
.t-label { font-size: .85rem; color: #5d6b6e; }
.t-valor { font-size: 2rem; font-weight: 600; color: #1f2a2c; line-height: 1.15; font-variant-numeric: tabular-nums; }
.delta { font-size: .82rem; font-weight: 600; }
.delta small { font-weight: 400; color: #7a8789; }
.delta.sobe { color: #1e7e34; } .delta.desce { color: #b71c1c; } .delta.neutro { color: #7a8789; font-weight: 400; }
.chart-card { margin-bottom: 18px; }
.card h2 { font-size: 1.05rem; margin: 0 0 12px; color: #1f2a2c; }
.card h2.h2-sub { margin-top: 20px; }
.linha-chart, .colunas-chart { width: 100%; }
.linha-chart svg, .colunas-chart svg { display: block; font-family: inherit; }
.linha-chart rect:focus, .colunas-chart rect:focus { outline: none; }
.colunas-chart rect:focus-visible { outline: 2px solid #0e8fa0; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stats-grid .card { margin: 0; }
.barras { list-style: none; margin: 0; padding: 0; }
.barras li { display: grid; grid-template-columns: minmax(0, 42%) 1fr auto; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 4px; cursor: default; }
.barras li:hover, .barras li:focus-visible { background: #f2f7f8; outline: none; }
.b-nome { font-size: .88rem; color: #1f2a2c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-nome a { color: #1f2a2c; text-decoration: none; }
.b-nome a:hover { text-decoration: underline; }
.b-nome small { display: block; color: #7a8789; font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.b-trilho { height: 10px; background: transparent; }
.b-barra { display: block; height: 10px; background: #0e8fa0; border-radius: 0 4px 4px 0; }
.b-valor { font-size: .85rem; font-weight: 600; color: #1f2a2c; min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.card .sub { font-size: .85rem; color: #5d6b6e; margin: 14px 0 4px; }
.tabela-dados { margin-top: 10px; }
.tabela-dados summary { cursor: pointer; color: #5d6b6e; font-size: .88rem; }
.tabela-dados table { margin-top: 8px; max-width: 420px; }
.tabela-dados td:not(:first-child), .tabela-dados th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.privacidade { margin-top: 20px; }
.chart-tip { position: fixed; z-index: 1000; pointer-events: none; background: #fff; border: 1px solid #dde4e6; border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 8px 10px; font-size: .85rem; min-width: 120px; }
.tt-titulo { color: #5d6b6e; font-size: .78rem; margin-bottom: 4px; }
.tt-linha { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tt-linha strong { color: #1f2a2c; font-variant-numeric: tabular-nums; }
.tt-linha span:last-child { color: #5d6b6e; }
.tt-chave { width: 12px; height: 2px; background: #0e8fa0; border-radius: 1px; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } .stats-grid { grid-template-columns: 1fr; } .t-valor { font-size: 1.6rem; } }

/* Aparência */
.ap-card { margin-bottom: 20px; }
.ap-card h2 { margin: 0 0 6px; font-size: 1.15rem; }
.ap-h2 { margin-top: 28px !important; padding-top: 20px; border-top: 1px solid #e6ecee; }
.ap-logo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; margin-top: 12px; }
.ap-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ap-previews figure { margin: 0; }
.ap-previews figcaption { font-size: .78rem; color: #667; margin-top: 4px; text-align: center; }
.pv { height: 120px; border-radius: 8px; display: grid; place-items: center; border: 1px solid #e3e8ea; overflow: hidden;
    background-image: linear-gradient(45deg, #f3f5f6 25%, transparent 25%), linear-gradient(-45deg, #f3f5f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f5f6 75%), linear-gradient(-45deg, transparent 75%, #f3f5f6 75%);
    background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.pv img { max-width: 80%; max-height: 96px; }
.pv-claro { background-color: #fff; }
.pv-escuro { background: #062a2e; }
.pv-aba { background: #dfe3e6; place-items: end start; padding: 0 0 0 10px; }
.pv-aba span { display: none; }
.pv-aba { display: flex; align-items: flex-end; }
.pv-aba::before { content: none; }
.pv-aba { position: relative; }
.pv-aba img { width: 16px; height: 16px; position: absolute; left: 22px; bottom: 26px; max-width: none; }
.pv-aba span { display: block; position: absolute; left: 46px; bottom: 25px; font-size: .78rem; color: #333; }
.pv-aba::after { content: ""; position: absolute; left: 10px; bottom: 16px; width: 170px; height: 34px; background: #fff; border-radius: 8px 8px 0 0; z-index: 0; }
.pv-aba img, .pv-aba span { z-index: 1; }
.pv-social { background: #fff; padding: 0; }
.pv-social img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.pv-novo { margin: -4px 0 12px; height: 110px; }
.ap-form label { margin-bottom: 12px; }
.ap-restaurar { margin-top: 12px; }
.ap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin-top: 10px; }
label.cor { display: flex; align-items: center; gap: 10px; font-weight: 600; }
label.cor input[type=color] { width: 54px; height: 36px; padding: 2px; border: 1px solid #ccd; border-radius: 6px; background: #fff; cursor: pointer; }
.cores2 { display: flex; gap: 24px; flex-wrap: wrap; }
.pv-site { position: relative; border-radius: 8px; border: 1px solid #dde4e6; background: #f2f7f8 center / cover no-repeat; padding-bottom: 18px; overflow: hidden; min-height: 210px; }
.pv-topo { background: #fff; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 3px solid #1bb3c4; font-size: .8rem; color: #062a2e; }
.pv-topo img { width: 26px; }
.pv-faixa { background: linear-gradient(120deg, #062a2e 55%, #0a8f1a); color: #fff; font-weight: 700; padding: 14px 16px; border-bottom: 3px solid #1bb3c4; }
.pv-conteudo { background: #fff; margin: 14px 16px 0; border-radius: 6px; padding: 12px; display: grid; gap: 7px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.pv-conteudo span { height: 7px; border-radius: 4px; background: #e3e9eb; }
.pv-conteudo span:nth-child(2) { width: 85%; } .pv-conteudo span:nth-child(3) { width: 60%; }
.pv-site > small { position: absolute; right: 8px; bottom: 2px; font-size: .7rem; color: #667; background: rgba(255,255,255,.8); padding: 0 6px; border-radius: 4px; }
@media (max-width: 900px) { .ap-logo, .ap-grid { grid-template-columns: 1fr; } }
.pv[hidden] { display: none; }
