:root {
    color-scheme: dark;
    --bg: #05070f;
    --bg-soft: #090d1d;
    --panel: rgba(11, 16, 32, 0.92);
    --panel-strong: #0b1020;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #3b82f6;
    --blue-strong: #2563eb;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
    --cyan: #22d3ee;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 36rem),
        linear-gradient(135deg, #05070f 0%, #090c1f 52%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

[hidden] {
    display: none !important;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-wrap {
    width: min(100%, 430px);
}

.login-card {
    background: rgba(11, 16, 32, 0.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.login-heading {
    text-align: center;
    margin-bottom: 22px;
}

.login-logo-frame {
    width: 210px;
    height: 118px;
    margin: 0 auto 10px;
    overflow: hidden;
    border-radius: 6px;
    background: #020302;
}

.login-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transform: scale(1.55);
    transform-origin: center;
}

.login-heading h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

.login-heading span {
    color: #60a5fa;
}

.login-heading p,
.support-line,
.copyright {
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.login-form input,
.field,
.select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #11162a;
    color: var(--text);
    outline: none;
    padding: 12px 14px;
}

.login-form input:focus,
.field:focus,
.select:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.primary-btn,
.tool-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.primary-btn {
    width: 100%;
    border-color: rgba(96, 165, 250, 0.36);
    background: linear-gradient(135deg, var(--blue), var(--blue-strong));
    padding: 12px 16px;
    font-weight: 700;
}

.primary-btn:hover,
.tool-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.icon-btn:hover {
    transform: translateY(-1px);
}

.form-message {
    margin: 0;
    text-align: center;
    font-size: 14px;
}

.form-message.error {
    color: #fca5a5;
}

.form-message.success {
    color: #86efac;
}

.support-line {
    margin-top: 22px;
    text-align: center;
    font-size: 14px;
}

.support-line a {
    color: #60a5fa;
}

.copyright {
    text-align: center;
    font-size: 12px;
    margin-top: 18px;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 288px;
    overflow-y: auto;
    background: rgba(5, 7, 15, 0.88);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
    padding: 22px;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}

.brand span,
.muted {
    color: var(--muted);
}

.side-section {
    display: grid;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.side-section:first-of-type {
    border-top: 0;
}

.section-title {
    margin: 0;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.key-preview,
.domain-row,
.mini-card {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.62);
    border-radius: 10px;
    padding: 11px;
}

.key-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
}

.domain-list {
    display: grid;
    gap: 10px;
}

.domain-row {
    display: grid;
    gap: 10px;
}

.domain-name {
    overflow: hidden;
    color: #e2e8f0;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.domain-actions,
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.action-grid {
    grid-template-columns: 1fr;
}

.tool-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
    background: rgba(30, 41, 59, 0.76);
    border-color: var(--line);
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 700;
}

.tool-btn:hover,
.icon-btn:hover {
    background: rgba(37, 99, 235, 0.28);
    border-color: rgba(96, 165, 250, 0.35);
}

.ghost-btn {
    background: rgba(15, 23, 42, 0.62);
}

.danger-btn {
    background: rgba(127, 29, 29, 0.42);
    border-color: rgba(239, 68, 68, 0.28);
}

.danger-btn:hover {
    background: rgba(185, 28, 28, 0.58);
}

.icon-btn {
    width: 36px;
    min-height: 34px;
    padding: 7px;
}

.small-btn {
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.76);
    color: var(--text);
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 800;
}

.small-btn.danger {
    background: rgba(127, 29, 29, 0.42);
    border-color: rgba(239, 68, 68, 0.28);
}

.small-btn:hover {
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(37, 99, 235, 0.28);
}

.icon-btn svg,
.tool-btn svg,
.ghost-btn svg,
.danger-btn svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #cbd5e1;
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-flex;
    width: 46px;
    height: 26px;
}

.switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.slider {
    position: absolute;
    inset: 0;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: #1f2937;
    transition: background 0.18s ease;
}

.slider:before {
    content: "";
    position: absolute;
    top: 3px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f8fafc;
    transition: transform 0.18s ease;
}

.switch input:checked + .slider {
    background: var(--blue-strong);
}

.switch input:checked + .slider:before {
    transform: translateX(18px);
}

.main {
    margin-left: 288px;
    padding: 26px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.topbar h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

.topbar p {
    margin: 8px 0 0;
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.16);
    color: #a5f3fc;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.72);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.kpi-card,
.chart-card,
.table-card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
}

.kpi-card {
    padding: 18px;
}

.kpi-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.kpi-card strong {
    display: block;
    margin-top: 8px;
    font-size: 30px;
    line-height: 1.1;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.chart-card {
    min-height: 180px;
    padding: 16px;
}

.chart-card h3,
.table-card h3 {
    margin: 0 0 14px;
    font-size: 14px;
    color: #cbd5e1;
}

.chart-card canvas {
    width: 100% !important;
    height: 112px !important;
}

.table-card {
    overflow: hidden;
    margin-bottom: 16px;
}

.table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
    white-space: nowrap;
}

th {
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.5);
    font-weight: 800;
}

td {
    color: #e2e8f0;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.035);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}

.badge.online {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.badge.offline {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.badge.blocked {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px;
}

.pagination button {
    min-width: 34px;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.86);
    color: var(--text);
}

.pagination button.active {
    border-color: rgba(96, 165, 250, 0.55);
    background: var(--blue-strong);
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 40px));
}

.toast {
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    background: rgba(11, 16, 32, 0.96);
    box-shadow: var(--shadow);
    padding: 13px 14px;
    color: var(--text);
}

.toast.success {
    border-left-color: var(--green);
}

.toast.error {
    border-left-color: var(--red);
}

.toast.warn {
    border-left-color: var(--amber);
}

.toast strong {
    display: block;
    margin-bottom: 3px;
}

.toast p {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.72);
    padding: 18px;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    width: min(100%, 460px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #0b1020;
    box-shadow: var(--shadow);
    padding: 18px;
}

.modal h3 {
    margin: 0 0 14px;
}

.modal form,
.payment-result,
.integration-result {
    display: grid;
    gap: 12px;
}

.modal label,
.payment-result label,
.integration-result label {
    display: grid;
    gap: 7px;
    color: #cbd5e1;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.empty-row {
    color: var(--muted);
    text-align: center;
}

.payment-qr {
    justify-self: center;
    width: 178px;
    height: 178px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    padding: 8px;
}

.payment-code {
    min-height: 112px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
}

.code-area {
    min-height: 74px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
}

.code-area.large {
    min-height: 190px;
}

.payment-meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 1180px) {
    .kpi-grid,
    .chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: relative;
        width: 100%;
        inset: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .main {
        margin-left: 0;
        padding: 18px;
    }

    .topbar {
        display: grid;
    }

    .kpi-grid,
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .login-card {
        padding: 22px;
    }

    .domain-actions {
        grid-template-columns: 1fr;
    }
}

/* Dashboard visual pass: closer to the provided PHP screenshot. */
body:not(.login-page) {
    background: #070b18;
    color: #f7f7fb;
    overflow-y: scroll;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body:not(.login-page)::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.domain-list::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

body:not(.login-page)::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.domain-list::-webkit-scrollbar-track {
    background: #0b0f1d;
}

body:not(.login-page)::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.domain-list::-webkit-scrollbar-thumb {
    background: #7164ff;
    border-radius: 999px;
}

.sidebar {
    width: 289px;
    padding: 18px 12px;
    background: #080b14;
    border-right: 1px solid #25293d;
    backdrop-filter: none;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 18px;
    min-height: 176px;
    padding: 10px 0 18px;
    border-bottom: 1px solid #25293d;
    overflow: hidden;
}

.brand-logo {
    display: block;
    width: min(232px, 88%);
    height: 150px;
    aspect-ratio: 1016 / 663;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    background: #020302;
    transform: scale(1.55);
    transform-origin: center;
}

.side-section {
    border-top: 0;
    padding: 0;
}

.gateway-section {
    display: block;
    margin-bottom: 22px;
    border: 1px solid #303441;
    border-radius: 5px;
    background: #171a22;
    padding: 18px 17px 16px;
}

.gateway-section .section-title {
    margin-bottom: 11px;
    color: #a5a8b4;
    font-size: 14px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    font-weight: 700;
}

.gateway-label {
    display: none;
}

.select {
    height: 37px;
    border: 1px solid #2b2f3a;
    border-radius: 7px;
    background: #05070c;
    color: #fff;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
}

.key-section {
    margin-bottom: 21px;
}

.key-preview {
    width: 100%;
    min-width: 0;
    min-height: 43px;
    border: 1px solid #303441;
    border-radius: 6px;
    background: #151820;
    color: #d8dbe7;
    padding: 0 13px;
    font-size: 12px;
}

.key-preview b {
    color: #22f5aa;
    font-size: 14px;
    letter-spacing: 0.03em;
    margin-right: 4px;
    font-weight: 700;
}

.key-preview > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.key-preview .icon-btn {
    display: none;
}

.domain-section {
    margin-bottom: 33px;
}

.domain-section .section-title,
.action-section .section-title {
    display: none;
}

.domain-list {
    max-height: 35px;
    min-height: 35px;
    overflow: auto;
    border: 1px solid #303441;
    border-radius: 5px;
    background: #151820;
    padding: 0;
}

.domain-row,
.mini-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 8px 17px;
}

.domain-name {
    font-size: 12px;
}

.domain-actions {
    display: none;
}

.action-section {
    margin-bottom: 23px;
}

.action-grid {
    gap: 8px;
}

.tool-btn,
.ghost-btn,
.danger-btn {
    justify-content: flex-start;
    min-height: 49px;
    border: 1px solid #191e29;
    border-radius: 5px;
    background: #141720;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    color: #f5f6fb;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.tool-btn:hover,
.ghost-btn:hover {
    background: #181c26;
    border-color: #2c3243;
    transform: none;
}

.action-grid .tool-btn svg,
.action-grid .danger-btn svg,
.sidebar > .side-section:last-child .danger-btn svg {
    display: none;
}

.sidebar > .side-section:nth-of-type(5) {
    display: grid;
    gap: 26px;
    margin-bottom: 20px;
}

.toggle-row {
    justify-content: flex-start;
    gap: 12px;
    min-height: 73px;
    border: 1px solid #303441;
    border-radius: 5px;
    background: #151820;
    padding: 12px 11px;
}

.toggle-row + .toggle-row {
    min-height: 47px;
}

.toggle-text {
    display: grid;
    gap: 1px;
    color: #e5e7eb;
    font-size: 16px;
    line-height: 1.08;
}

.toggle-text strong {
    font-weight: 600;
}

.toggle-text small {
    color: #7d808c;
    font-size: 14px;
}

.switch {
    flex: 0 0 auto;
    width: 46px;
    height: 22px;
}

.slider {
    border: 0;
    background: #3b3f49;
}

.slider:before {
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
}

.switch input:checked + .slider {
    background: #5d56f4;
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.sidebar > .side-section:last-child {
    padding-top: 16px;
    border-top: 1px solid #25293d;
}

.sidebar > .side-section:last-child .danger-btn {
    justify-content: center;
    min-height: 37px;
    border: 0;
    border-radius: 7px;
    background: #dc2626;
    box-shadow: none;
    font-size: 14px;
}

.main {
    margin-left: 289px;
    padding: 17px 33px 0 16px;
}

.topbar {
    display: none;
}

.summary-grid,
.kpi-grid,
.chart-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 8px;
}

.summary-grid {
    display: grid;
    align-items: stretch;
}

.summary-grid .kpi-visitas {
    grid-column: 1;
    grid-row: 1;
}

.summary-grid .kpi-pix {
    grid-column: 2;
    grid-row: 1;
}

.summary-grid .kpi-faturamento {
    grid-column: 1;
    grid-row: 2;
}

.summary-grid .kpi-online {
    grid-column: 2;
    grid-row: 2;
}

.kpi-grid {
    width: calc(50% - 12px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-card {
    min-height: 86px;
    border-radius: 15px;
    padding: 17px 24px;
    box-shadow: none;
}

.kpi-card p {
    color: #9cc9ff;
    font-size: 14px;
    font-weight: 600;
}

.kpi-card strong {
    margin-top: 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 700;
}

.kpi-visitas {
    border-color: #1d3d79;
    background: #0b1b3b;
}

.kpi-pix {
    border-color: #126348;
    background: #062e25;
}

.kpi-pix p {
    color: #75f0a5;
}

.kpi-faturamento {
    border-color: #6c4d0d;
    background: #251c14;
}

.kpi-faturamento p {
    color: #f5d532;
}

.kpi-online {
    border-color: #4f2c7d;
    background: #21123d;
}

.kpi-online p {
    color: #c7a3f7;
}

.chart-card {
    min-height: 197px;
    border-color: #2b3041;
    border-radius: 15px;
    background: #151724;
    box-shadow: none;
    padding: 20px 20px 17px;
}

.chart-grid .kpi-card {
    min-height: 86px;
    padding: 17px 24px;
}

.conversion-grid {
    grid-column: 3 / span 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    min-height: 210px;
}

.conversion-card {
    display: grid;
    min-width: 0;
    min-height: 210px;
    align-content: center;
    justify-items: center;
    gap: 13px;
    border: 1px solid #2b3041;
    border-radius: 15px;
    background: #040608;
    padding: 17px 16px;
}

.conversion-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}

.conversion-card p {
    margin: 0;
    color: #858a96;
    font-size: 12px;
    white-space: nowrap;
}

.gauge-ring {
    --value: 0;
    position: relative;
    display: grid;
    width: 106px;
    height: 106px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(from -90deg, #6ff05c calc(var(--value) * 1%), #2a2a2a 0);
}

.gauge-ring:before {
    content: "";
    position: absolute;
    inset: 17px;
    border-radius: 50%;
    background: #040608;
}

.gauge-ring span {
    position: relative;
    z-index: 1;
    color: #f8fafc;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
}

.chart-card h3 {
    margin-bottom: 9px;
    color: #9cc9ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.chart-card:nth-child(2) h3 {
    color: #75f0a5;
}

.chart-card:nth-child(3) h3 {
    color: #f5d532;
}

.chart-card:nth-child(4) h3 {
    color: #c7a3f7;
}

.chart-card canvas {
    height: 135px !important;
}

.table-card {
    margin-bottom: 0;
    border-color: #26304a;
    border-radius: 5px;
    background: #081020;
    box-shadow: none;
}

.table-card + .table-card {
    margin-top: 0;
}

.visits-table {
    display: flex;
    min-height: 484px;
    flex-direction: column;
}

.visits-table .table-wrap {
    flex: 1;
}

.table-head {
    min-height: 44px;
    border-bottom-color: #27304a;
    padding: 10px 20px;
}

.table-head h3 {
    margin: 0;
    color: #9cc9ff;
    font-size: 19px;
    font-weight: 700;
}

.pix-table .table-head h3 {
    color: #85ffa9;
}

.table-head .muted {
    display: none;
}

.table-wrap {
    overflow-x: auto;
    scrollbar-color: #7164ff #0b0f1d;
}

table {
    min-width: 1550px;
}

th,
td {
    height: 31px;
    border-bottom-color: rgba(255, 255, 255, 0.035);
    padding: 5px 7px;
    font-size: 13px;
}

th {
    background: #151b30;
    color: #a9adba;
    font-size: 16px;
    font-weight: 700;
}

td {
    color: #aeb5c7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

td:nth-child(1),
td:nth-child(2),
td:nth-child(5),
td:nth-child(6),
td:nth-child(8),
td:nth-child(9),
td:nth-child(10),
td:nth-child(11) {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

.block-action,
.blocked-label,
.delete-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: #ff6475;
    padding: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 0.95;
}

.minus-dot {
    position: relative;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #ff4f7e;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.minus-dot:before {
    content: "";
    position: absolute;
    top: 6px;
    left: 3px;
    width: 8px;
    height: 2px;
    border-radius: 4px;
    background: #fff;
}

.delete-action span {
    width: 8px;
    overflow: hidden;
    color: #ff6475;
    font-size: 13px;
    line-height: 1;
}

.device-badge,
.browser-badge,
.tag,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.device-badge img,
.browser-badge img {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
    display: block;
}

.device-badge {
    background: #0c2a55;
    color: #61a8ff;
}

.browser-badge,
.tag-purple {
    background: #241740;
    color: #c084fc;
}

.badge.online {
    background: #0b3b29;
    color: #74f0a2;
}

.badge.offline {
    background: #351522;
    color: #ff6475;
}

.badge.blocked {
    background: #351522;
    color: #ff6475;
}

.pagination {
    padding: 0;
}

@media (max-width: 1180px) {
    .kpi-grid {
        width: 100%;
    }
}

/* Green/black/gray theme override. */
:root {
    --bg: #020403;
    --bg-soft: #070a08;
    --panel: rgba(5, 8, 6, 0.96);
    --panel-strong: #050806;
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(34, 197, 94, 0.42);
    --text: #f3f4f6;
    --muted: #8a908c;
    --blue: #22c55e;
    --blue-strong: #16a34a;
    --green: #6ff05c;
    --amber: #9ca3af;
    --cyan: #86efac;
}

body,
body:not(.login-page) {
    background: #010201;
    color: #f3f4f6;
}

body:not(.login-page)::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track,
.domain-list::-webkit-scrollbar-track {
    background: #050806;
}

body:not(.login-page)::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.domain-list::-webkit-scrollbar-thumb {
    background: #22c55e;
}

.login-page {
    background:
        radial-gradient(circle at top, rgba(34, 197, 94, 0.14), transparent 32rem),
        #010201;
}

.login-card {
    background: #050806;
    border-color: rgba(34, 197, 94, 0.22);
}

.login-heading span,
.support-line a,
.brand h1,
.brand strong,
.key-preview b,
.table-head h3,
.pix-table .table-head h3 {
    color: #6ff05c;
}

.login-form input,
.field,
.select {
    background: #030504;
    border-color: #29302c;
}

.login-form input:focus,
.field:focus,
.select:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.primary-btn {
    border-color: rgba(34, 197, 94, 0.42);
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.sidebar {
    background: #020403;
    border-right-color: #1c241f;
}

.brand,
.sidebar > .side-section:last-child {
    border-color: #1c241f;
}

.brand span,
.brand p,
.muted,
.gateway-section .section-title,
.toggle-text small,
.conversion-card p {
    color: #8a908c;
}

.gateway-section,
.key-preview,
.domain-list,
.toggle-row {
    background: #080b09;
    border-color: #27312b;
}

.select {
    background: #010201;
    color: #f3f4f6;
}

.tool-btn,
.ghost-btn,
.danger-btn {
    background: #0a0d0b;
    border-color: #1d251f;
    color: #f3f4f6;
}

.tool-btn:hover,
.ghost-btn:hover {
    background: #0d1711;
    border-color: #22c55e;
}

.slider {
    background: #3f4642;
}

.switch input:checked + .slider {
    background: #22c55e;
}

.kpi-card,
.conversion-card {
    background: linear-gradient(135deg, #050806, #0a100c);
    border-color: #1f5f35;
}

.kpi-card p,
.kpi-pix p,
.kpi-faturamento p,
.kpi-online p {
    color: #86efac;
}

.kpi-card strong {
    color: #f9fafb;
}

.conversion-card {
    background: #020302;
    border-color: #2a4734;
}

.conversion-card h3 {
    color: #f3f4f6;
}

.gauge-ring {
    background: conic-gradient(from -90deg, #6ff05c calc(var(--value) * 1%), #2c322f 0);
}

.gauge-ring:before {
    background: #020302;
}

.table-card {
    background: #030705;
    border-color: #243328;
}

.table-head {
    border-bottom-color: #223027;
}

.table-wrap {
    scrollbar-color: #22c55e #050806;
}

th {
    background: #0c110e;
    color: #a9b1ac;
}

td {
    color: #b8c0bb;
}

tr:hover td {
    background: rgba(34, 197, 94, 0.035);
}

.device-badge,
.browser-badge,
.tag-purple {
    background: #0f1d14;
    color: #86efac;
}

.badge.online {
    background: #0f2a18;
    color: #86efac;
}

.pagination button {
    background: #080c09;
    border-color: #223027;
}

.pagination button.active {
    background: #16a34a;
    border-color: #22c55e;
}

.toast {
    background: #050806;
    border-left-color: #22c55e;
}

.modal {
    background: #050806;
    border-color: #243328;
}

.payment-qr {
    border-color: #243328;
}

.payment-code,
.code-area {
    background: #030504;
    border-color: #29302c;
    color: #f3f4f6;
}

.payment-meta {
    color: #8a908c;
}
