:root {
    --bg: #0c1520;
    --bg-card: #121d2b;
    --bg-elevated: #1a2738;
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8eef5;
    --muted: #8fa3b8;
    --accent: #2dd4bf;
    --accent-dim: rgba(45, 212, 191, 0.15);
    --warning: #fbbf24;
    --danger: #f87171;
    --radius: 12px;
    --font: "DM Sans", system-ui, sans-serif;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.bg-wave {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 191, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(56, 189, 248, 0.06), transparent),
        var(--bg);
}

.site-header {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
    background: rgba(12, 21, 32, 0.85);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #0891b2);
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.35);
}

.brand h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.link-gmb {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.35);
    transition: background 0.2s, border-color 0.2s;
}

.link-gmb:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.layout {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.panel-info {
    border-color: rgba(45, 212, 191, 0.2);
}

.panel-head {
    margin-bottom: 1.25rem;
}

.panel-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
    max-width: 65ch;
}

.google-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.stat-card .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 0.25rem;
}

.stat-card .value {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.stat-card .value.empty {
    color: var(--muted);
    font-weight: 500;
    font-size: 1rem;
}

form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.form-row {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-row.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.form-row.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-row.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
    .form-row.cols-3,
    .form-row.cols-4 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .form-row.cols-2,
    .form-row.cols-3,
    .form-row.cols-4 {
        grid-template-columns: 1fr;
    }
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
}

label.full {
    grid-column: 1 / -1;
}

.optional {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.75rem;
}

input,
select,
textarea {
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    border: none;
    transition: transform 0.15s, filter 0.15s;
}

.btn:active {
    transform: scale(0.98);
}

.btn.primary {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    color: #042f2e;
}

.btn.primary:hover {
    filter: brightness(1.08);
}

.btn.ghost {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.4);
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.btn.ghost:hover {
    background: rgba(248, 113, 113, 0.1);
}

.meta-update {
    margin: 1rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.ads-static {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.ads-static h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.ads-static-note {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 70ch;
}

.ads-static-table {
    margin-top: 0;
}

.table-wrap {
    margin-top: 1.5rem;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-elevated);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table .num {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.anuncio {
    background: rgba(56, 189, 248, 0.15);
    color: #7dd3fc;
}

.badge.alavancagem {
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent);
}

.site-footer {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.6;
}

.site-footer code {
    font-size: 0.85em;
    color: var(--accent);
}

.toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 100;
    padding: 0.75rem 1.1rem;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    max-width: min(360px, calc(100vw - 2rem));
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.error {
    border-color: rgba(248, 113, 113, 0.5);
    color: #fecaca;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
