:root {
    --rj-navy: #0a1628;
    --rj-navy-mid: #0f2347;
    --rj-navy-soft: #152d5a;
    --rj-orange: #f97316;
    --rj-orange-dark: #ea580c;
    --rj-cyan: #38bdf8;
    --rj-cyan-soft: rgba(56, 189, 248, 0.16);

    --app-bg: #edf1f7;
    --app-surface: rgba(255, 255, 255, 0.92);
    --app-surface-strong: #ffffff;
    --app-border: rgba(15, 35, 71, 0.1);
    --app-text: #0a1628;
    --app-text-soft: #5b6b85;
    --app-primary: var(--rj-orange-dark);
    --app-primary-soft: rgba(249, 115, 22, 0.12);
    --app-success-soft: rgba(16, 185, 129, 0.12);
    --app-warning-soft: rgba(245, 158, 11, 0.12);
    --app-danger-soft: rgba(239, 68, 68, 0.12);
    --app-shadow: 0 18px 50px rgba(10, 22, 40, 0.1);
    --app-radius: 1.1rem;
}

html, body {
    font-family: "Segoe UI", Inter, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(circle at top right, var(--rj-cyan-soft), transparent 22rem),
        radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.06), transparent 18rem),
        linear-gradient(180deg, #f7f9fc 0%, var(--app-bg) 100%);
    color: var(--app-text);
}

body {
    min-height: 100vh;
}

a, .btn-link {
    color: var(--app-primary);
}

.btn {
    border-radius: 0.95rem;
    font-weight: 600;
    padding: 0.72rem 1.1rem;
    transition: all 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--rj-orange), var(--rj-orange-dark));
    border: none;
    box-shadow: 0 14px 30px rgba(234, 88, 12, 0.24);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(234, 88, 12, 0.32);
    color: #fff;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-dark,
.btn-outline-danger {
    border-width: 1px;
}

.btn-outline-primary {
    border-color: rgba(234, 88, 12, 0.28);
    color: var(--rj-orange-dark);
    background: rgba(255, 255, 255, 0.82);
}

.btn-outline-secondary,
.btn-outline-dark {
    border-color: rgba(148, 163, 184, 0.25);
    color: #334155;
    background: rgba(255, 255, 255, 0.72);
}

.btn-outline-success {
    border-color: rgba(16, 185, 129, 0.28);
    color: #047857;
    background: rgba(236, 253, 245, 0.8);
}

.btn-outline-warning {
    border-color: rgba(245, 158, 11, 0.28);
    color: #b45309;
    background: rgba(255, 251, 235, 0.88);
}

.btn-outline-danger {
    border-color: rgba(239, 68, 68, 0.28);
    color: #b91c1c;
    background: rgba(254, 242, 242, 0.88);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem rgba(255,255,255,.75), 0 0 0 0.25rem rgba(249,115,22,.2);
    border-color: rgba(249, 115, 22, 0.45);
}

.card,
.surface-card {
    border: 1px solid var(--app-border);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.84));
    box-shadow: var(--app-shadow);
    border-radius: var(--app-radius);
    overflow: hidden;
}

.card .card-body {
    padding: 1.35rem;
}

.page-hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.55rem;
    border-radius: calc(var(--app-radius) + 0.15rem);
    overflow: hidden;
    background:
        radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.22), transparent 28rem),
        radial-gradient(circle at 10% 100%, rgba(249, 115, 22, 0.18), transparent 16rem),
        linear-gradient(135deg, var(--rj-navy) 0%, var(--rj-navy-mid) 55%, var(--rj-navy-soft) 100%);
    color: white;
    border: 1px solid rgba(56, 189, 248, 0.18);
    box-shadow: 0 24px 60px rgba(10, 22, 40, 0.28);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.35) 1px, transparent 1px),
        radial-gradient(circle at 70% 60%, rgba(56, 189, 248, 0.25) 1px, transparent 1px);
    background-size: 48px 48px, 64px 64px;
    opacity: 0.35;
    pointer-events: none;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero-title {
    font-size: clamp(1.8rem, 2.4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.page-hero-text {
    max-width: 48rem;
    color: rgba(255,255,255,0.82);
    margin: 0;
}

.page-hero-meta {
    min-width: 12rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(8px);
}

.page-hero-kicker {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.8);
    font-weight: 700;
}

.page-hero-value {
    font-size: 1.7rem;
    font-weight: 800;
    margin-top: 0.2rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--app-text);
    margin: 0;
}

.section-subtitle {
    color: var(--app-text-soft);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.stat-card {
    position: relative;
    padding: 1.35rem;
    min-height: 100%;
}

.stat-label {
    color: var(--app-text-soft);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    margin-top: 0.8rem;
    font-size: 2rem;
    line-height: 1;
    font-weight: 800;
    color: var(--app-text);
}

.stat-card.primary::before,
.stat-card.success::before,
.stat-card.warning::before,
.stat-card.danger::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 1;
    pointer-events: none;
}

.stat-card.primary::before { background: linear-gradient(135deg, rgba(249,115,22,.14), transparent 60%); }
.stat-card.success::before { background: linear-gradient(135deg, rgba(16,185,129,.12), transparent 60%); }
.stat-card.warning::before { background: linear-gradient(135deg, rgba(245,158,11,.14), transparent 60%); }
.stat-card.danger::before { background: linear-gradient(135deg, rgba(239,68,68,.14), transparent 60%); }

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(148, 163, 184, 0.04);
    --bs-table-hover-bg: rgba(249, 115, 22, 0.04);
}

.table thead th {
    color: #475569;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

.table > :not(caption) > * > * {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

.form-control,
.form-select {
    min-height: 3rem;
    border-radius: 0.95rem;
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(255, 255, 255, 0.9);
}

textarea.form-control {
    min-height: 7rem;
}

.form-label {
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.45rem;
}

.form-text {
    color: #64748b;
}

.badge {
    border-radius: 999px;
    padding: 0.5rem 0.75rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.list-group-item {
    border-color: rgba(148, 163, 184, 0.14);
    background: transparent;
}

.glass-note {
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
}

.app-header-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.app-eyebrow {
    color: var(--app-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    font-weight: 800;
}

.app-console {
    min-height: 18rem;
    max-height: 32rem;
    overflow: auto;
    padding: 1rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #0f172a, #111827);
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-bar {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.entity-title {
    font-weight: 700;
    color: var(--app-text);
}

.entity-subtitle {
    color: var(--app-text-soft);
    font-size: 0.9rem;
}

.certificate-card-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1rem;
}

.dashboard-certificate-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 600px));
    justify-content: start;
}

.dashboard-certificate-card {
    width: min(100%, 600px);
    min-height: 280px;
    margin-inline: auto;
}

.certificate-card-button {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    overflow: hidden;
}

.certificate-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 1.15rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.92));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    overflow: hidden;
    min-width: 0;
}

.certificate-card-button:hover .certificate-card,
.certificate-card-button:focus-visible .certificate-card {
    transform: translateY(-3px);
    box-shadow: 0 24px 46px rgba(234, 88, 12, 0.14);
    border-color: rgba(56, 189, 248, 0.22);
}

.certificate-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-width: 0;
}

.certificate-card-top > div:first-child {
    flex: 1 1 10rem;
    min-width: 0;
}

.certificate-card-top .entity-title,
.certificate-card-top .entity-subtitle {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.certificate-card-top .badge {
    flex: 0 0 auto;
    align-self: flex-start;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
}

.certificate-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.certificate-metric {
    padding: 0.9rem;
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.certificate-metric-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ea580c;
    font-weight: 800;
}

.certificate-metric-value {
    margin-top: 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-list-card .entity-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
    max-height: 5.5rem;
    overflow: hidden;
}

.certificate-tag,
.certificate-tag-compact {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-tag-compact {
    flex: 0 1 auto;
}

.certificate-tag.primary {
    color: #4338ca;
    background: rgba(56, 189, 248, 0.1);
}

.certificate-tag.success {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.certificate-tag.warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.14);
}

.certificate-tag.neutral {
    color: #334155;
    background: rgba(148, 163, 184, 0.14);
}

.certificate-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--app-text-soft);
    font-size: 0.9rem;
}

.certificate-card-arrow {
    color: #0f2347;
    font-weight: 700;
}

.floating-card-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
}

.floating-action-card {
    width: min(760px, 100%);
    max-height: 90vh;
    overflow: auto;
    padding: 1.4rem;
    border-radius: 1.4rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

.floating-card-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.floating-card-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.floating-card-info > div {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.floating-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.pair-code-box {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.9), rgba(224, 231, 255, 0.78));
}

.pair-code-value {
    margin-top: 0.4rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #312e81;
}

.agent-task-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 0.92rem;
}

.agent-selected-card {
    border-color: rgba(234, 88, 12, 0.42);
    box-shadow: 0 24px 46px rgba(234, 88, 12, 0.14);
}

.command-center-card {
    border-style: dashed;
}

.app-loading-banner {
    border-radius: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.95), rgba(219, 234, 254, 0.88));
    box-shadow: 0 18px 35px rgba(59, 130, 246, 0.08);
}

.app-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.18);
    border-top-color: #2563eb;
    animation: app-spin 0.9s linear infinite;
    flex: 0 0 auto;
}

@keyframes app-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.pix-checkout {
    border: 1px solid rgba(50, 188, 173, 0.22);
    border-radius: calc(var(--app-radius) + 0.1rem);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
        linear-gradient(135deg, rgba(50, 188, 173, 0.05), rgba(234, 88, 12, 0.04));
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.1);
}

.pix-checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(50, 188, 173, 0.12), rgba(234, 88, 12, 0.08));
}

.pix-checkout-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.pix-checkout-logo {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    background: linear-gradient(135deg, #32bcad, #0f9f8e);
    box-shadow: 0 12px 24px rgba(50, 188, 173, 0.28);
}

.pix-checkout-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0f766e;
}

.pix-checkout-amount {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--app-text);
}

.pix-timer-section {
    display: flex;
    justify-content: center;
    padding: 1.35rem 1.35rem 0.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background:
        radial-gradient(circle at top, rgba(50, 188, 173, 0.12), transparent 18rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 250, 252, 0.35));
}

.pix-timer {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 1.2rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(50, 188, 173, 0.22);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.pix-timer-visual {
    position: relative;
    width: 7.5rem;
    height: 7.5rem;
    flex: 0 0 auto;
}

.pix-timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pix-timer-track,
.pix-timer-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.pix-timer-track {
    stroke: rgba(148, 163, 184, 0.22);
}

.pix-timer-progress {
    stroke: #32bcad;
    stroke-dasharray: 339.292;
    transition: stroke-dashoffset 0.95s linear, stroke 0.3s ease;
}

.pix-timer-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
}

.pix-timer-number {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #0f766e;
    transition: transform 0.18s ease, color 0.3s ease;
}

.pix-timer-suffix {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--app-text-soft);
}

.pix-timer-copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.pix-timer-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--app-text);
}

.pix-timer-subtitle {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--app-text-soft);
    max-width: 18rem;
}

.pix-timer.is-warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(255, 251, 235, 0.95);
}

.pix-timer.is-warning .pix-timer-progress {
    stroke: #f59e0b;
}

.pix-timer.is-warning .pix-timer-number {
    color: #b45309;
}

.pix-timer.is-urgent,
.pix-timer.is-expired {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(254, 242, 242, 0.96);
    animation: pix-timer-pulse 1s ease-in-out infinite;
}

.pix-timer.is-urgent .pix-timer-progress,
.pix-timer.is-expired .pix-timer-progress {
    stroke: #ef4444;
}

.pix-timer.is-urgent .pix-timer-number,
.pix-timer.is-expired .pix-timer-number {
    color: #b91c1c;
    transform: scale(1.04);
}

@keyframes pix-timer-pulse {
    0%, 100% {
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    }

    50% {
        box-shadow: 0 18px 40px rgba(239, 68, 68, 0.18);
    }
}

.pix-checkout-body {
    padding: 1.35rem;
}

.pix-checkout-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1.35rem;
    align-items: start;
}

.pix-qr-panel,
.pix-copy-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pix-qr-frame {
    display: grid;
    place-items: center;
    padding: 1rem;
    border-radius: 1.15rem;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), 0 16px 34px rgba(15, 23, 42, 0.08);
}

.pix-qr-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 0.65rem;
}

.pix-qr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 220px;
    border-radius: 1.15rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px dashed rgba(148, 163, 184, 0.35);
    color: var(--app-text-soft);
    font-weight: 600;
}

.pix-steps {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--app-text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.pix-steps li + li {
    margin-top: 0.35rem;
}

.pix-copy-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-soft);
}

.pix-copy-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pix-copy-code {
    width: 100%;
    resize: none;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.95rem 1rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.pix-copy-code:focus {
    outline: none;
    border-color: rgba(50, 188, 173, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(50, 188, 173, 0.16);
}

.pix-copy-button {
    align-self: flex-start;
}

.pix-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgba(241, 245, 249, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
}

.pix-status-pill.is-active {
    background: rgba(236, 253, 245, 0.95);
    border-color: rgba(16, 185, 129, 0.28);
    color: #047857;
}

.pix-checkout-note {
    font-size: 0.86rem;
    color: var(--app-text-soft);
    line-height: 1.5;
}

.pix-expired-banner {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.28);
    background: rgba(254, 242, 242, 0.95);
}

.pix-expired-title {
    font-weight: 800;
    color: #b91c1c;
    margin-bottom: 0.25rem;
}

.pix-expired-text {
    color: #7f1d1d;
    font-size: 0.92rem;
}

.account-avatar-preview {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 999px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(234, 88, 12, 0.98));
    box-shadow: 0 16px 34px rgba(10, 22, 40, 0.16);
}

.account-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-avatar-fallback {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.06em;
}

.app-spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--app-text);
    margin: 0;
}

.settings-section-subtitle {
    margin: 0.25rem 0 0;
    color: var(--app-text-soft);
    font-size: 0.92rem;
}

.settings-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.15rem;
    padding: 1.25rem;
    height: 100%;
}

.settings-panel-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--app-text);
    margin-bottom: 0.85rem;
}

.settings-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.settings-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(10, 22, 40, 0.05);
    color: var(--app-text-soft);
    font-size: 0.82rem;
    font-weight: 600;
}

.settings-chip strong {
    color: var(--app-text);
}

.settings-preview {
    margin-top: 1rem;
    max-height: 16rem;
    overflow: auto;
}

@media (max-width: 768px) {
    .page-hero {
        flex-direction: column;
    }

    .certificate-card-meta,
    .floating-card-info {
        grid-template-columns: 1fr;
    }

    .pix-checkout-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pix-timer {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .pix-timer-copy {
        align-items: center;
    }

    .pix-timer-subtitle {
        max-width: none;
    }

    .pix-checkout-grid {
        grid-template-columns: 1fr;
    }

    .pix-copy-button {
        width: 100%;
    }
}

.billing-pricing-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color);
}

.billing-pricing-table td {
    vertical-align: middle;
}

.billing-pricing-footnote {
    line-height: 1.5;
}

/* ---- Agent console (detalhe do agente) ---- */
.agent-console {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: 2rem;
    overflow-x: hidden;
    min-width: 0;
}

.agent-console-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--app-text-soft);
}

.agent-console-breadcrumb a {
    color: var(--app-text-soft);
    text-decoration: none;
    font-weight: 600;
}

.agent-console-breadcrumb a:hover {
    color: var(--rj-orange-dark);
}

.agent-console-loading,
.agent-console-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--app-surface-strong);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
}

.agent-console-loading-bar {
    width: 160px;
    height: 4px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rj-orange), var(--rj-cyan), var(--rj-orange));
    background-size: 200% 100%;
    animation: agent-shimmer 1.2s linear infinite;
}

@keyframes agent-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.agent-console-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.75rem 1.85rem;
    border-radius: calc(var(--app-radius) + 0.15rem);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 42%),
        linear-gradient(135deg, var(--rj-navy) 0%, var(--rj-navy-mid) 55%, var(--rj-navy-soft) 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(10, 22, 40, 0.22);
    margin-bottom: 1.25rem;
}

.agent-console-hero-main {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    min-width: 0;
}

.agent-console-avatar {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1.15rem;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

.agent-console-avatar svg {
    width: 2rem;
    height: 2rem;
    color: #e2e8f0;
}

.agent-console-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 0.25rem;
}

.agent-console-identity {
    min-width: 0;
    flex: 1;
}

.agent-console-title {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-console-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.78);
    min-width: 0;
}

.agent-console-meta > span {
    overflow-wrap: anywhere;
}

.agent-console-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.agent-console-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.agent-console-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.agent-console-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.agent-console-status.is-online {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
    border-color: rgba(187, 247, 208, 0.35);
}

.agent-console-status.is-online .agent-console-status-dot {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: agent-pulse 2s infinite;
}

.agent-console-status.is-offline {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

.agent-console-status.is-warning {
    background: rgba(250, 204, 21, 0.16);
    color: #fef3c7;
}

.agent-console-status.is-pending {
    background: rgba(56, 189, 248, 0.16);
    color: #bae6fd;
}

@keyframes agent-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.agent-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.agent-kpi-card {
    padding: 1rem 1.1rem;
    border-radius: var(--app-radius);
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    box-shadow: 0 8px 24px rgba(10, 22, 40, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    min-height: 7.25rem;
    display: flex;
    flex-direction: column;
}

.agent-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(10, 22, 40, 0.08);
}

.agent-kpi-card.kpi-warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.agent-kpi-card.kpi-critical {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

.agent-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-text-soft);
    font-weight: 600;
}

.agent-kpi-value {
    margin-top: 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--app-text);
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-kpi-hint {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--app-text-soft);
    line-height: 1.4;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agent-console-alert {
    border-radius: var(--app-radius);
    margin-bottom: 1.25rem;
}

.agent-section {
    margin-bottom: 1.5rem;
}

.agent-section-head h2,
.agent-panel-head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--app-text);
    letter-spacing: -0.01em;
}

.agent-section-head p,
.agent-panel-head p {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--app-text-soft);
}

.agent-section-head {
    margin-bottom: 1rem;
}

.agent-monitor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.35rem;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.agent-monitor-tab {
    border: none;
    background: transparent;
    color: var(--app-text-soft);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.agent-monitor-tab:hover {
    color: var(--app-text);
    background: rgba(255, 255, 255, 0.55);
}

.agent-monitor-tab.active {
    color: var(--app-text);
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.agent-monitor-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
}

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

.agent-process-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.agent-process-table th,
.agent-process-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.agent-process-table th {
    color: var(--app-text-soft);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.agent-process-table tbody tr:last-child td {
    border-bottom: none;
}

.agent-monitor-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agent-monitor-row-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.agent-monitor-row-pair .agent-monitor-card {
    height: 100%;
}

.agent-monitor-card-wide {
    width: 100%;
}

.agent-monitor-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.agent-disk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 0.75rem;
}

.agent-disk-grid .agent-disk-item + .agent-disk-item {
    margin-top: 0;
}

.agent-ip-list-wide {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 0.45rem;
    max-height: none;
}

.agent-monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.agent-monitor-card {
    padding: 1.15rem 1.2rem;
    border-radius: calc(var(--app-radius) + 0.05rem);
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    box-shadow: 0 10px 28px rgba(10, 22, 40, 0.05);
    min-width: 0;
    overflow: hidden;
}

.agent-monitor-card-heading {
    min-width: 0;
    flex: 1;
}

.agent-monitor-card-storage {
    display: flex;
    flex-direction: column;
}

.agent-disk-scroll {
    max-height: min(22rem, 42vh);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    margin-right: -0.15rem;
    scrollbar-gutter: stable;
}

.agent-disk-scroll::-webkit-scrollbar {
    width: 6px;
}

.agent-disk-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.agent-disk-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.agent-monitor-card.surface-warning {
    border-color: rgba(245, 158, 11, 0.38);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.7) 0%, #fff 55%);
}

.agent-monitor-card.surface-critical {
    border-color: rgba(239, 68, 68, 0.38);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.7) 0%, #fff 55%);
}

.agent-monitor-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
    min-width: 0;
}

.agent-monitor-card-head h3 {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    font-weight: 800;
}

.agent-monitor-icon {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.agent-monitor-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.agent-monitor-icon.disk { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.agent-monitor-icon.memory { background: rgba(168, 85, 247, 0.12); color: #7c3aed; }
.agent-monitor-icon.network { background: rgba(56, 189, 248, 0.14); color: #0284c7; }
.agent-monitor-icon.specs { background: rgba(249, 115, 22, 0.12); color: var(--rj-orange-dark); }

.agent-monitor-badge {
    display: inline-flex;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.agent-monitor-badge.ok { background: var(--app-success-soft); color: #047857; }
.agent-monitor-badge.warning { background: var(--app-warning-soft); color: #b45309; }
.agent-monitor-badge.critical { background: var(--app-danger-soft); color: #b91c1c; }
.agent-monitor-badge.info { background: var(--rj-cyan-soft); color: #0369a1; }
.agent-monitor-badge.neutral { background: rgba(148, 163, 184, 0.14); color: #475569; }

.agent-disk-block + .agent-disk-block {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.28);
}

.agent-disk-item {
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.75);
}

.agent-disk-item + .agent-disk-item {
    margin-top: 0.75rem;
}

.agent-disk-item.disk-warning {
    border-color: rgba(245, 158, 11, 0.38);
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.85) 0%, #fff 100%);
}

.agent-disk-item.disk-critical {
    border-color: rgba(239, 68, 68, 0.42);
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.9) 0%, #fff 100%);
}

.agent-disk-item-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
    min-width: 0;
}

.agent-disk-item-head .agent-monitor-badge {
    flex-shrink: 0;
}

.agent-disk-item-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.agent-disk-item-title strong {
    font-size: 0.98rem;
    color: var(--app-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-disk-item-type {
    font-size: 0.76rem;
    color: var(--app-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.agent-disk-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
}

.agent-disk-foot,
.agent-monitor-foot {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--app-text-soft);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.agent-monitor-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--app-text-soft);
}

.agent-health-progress {
    height: 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    overflow: hidden;
}

.agent-health-progress-bar {
    height: 100%;
    border-radius: inherit;
    transition: width 0.4s ease;
}

.agent-health-progress-bar.bar-ok { background: linear-gradient(90deg, #22c55e, #16a34a); }
.agent-health-progress-bar.bar-warning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.agent-health-progress-bar.bar-critical { background: linear-gradient(90deg, #f87171, #dc2626); }

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

.agent-trend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.agent-trend-table th,
.agent-trend-table td {
    padding: 0.55rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.agent-trend-table th {
    color: var(--app-text-soft);
    font-weight: 600;
}

.agent-trend-table tbody tr:last-child td {
    border-bottom: none;
}

.agent-metric-ring-wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.agent-metric-ring {
    --ring-value: 0;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, #fff 74%, transparent 76% 100%),
        conic-gradient(#16a34a calc(var(--ring-value) * 1%), rgba(148, 163, 184, 0.18) 0);
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--app-text);
}

.agent-metric-ring.ring-warning {
    background:
        radial-gradient(closest-side, #fff 74%, transparent 76% 100%),
        conic-gradient(#f59e0b calc(var(--ring-value) * 1%), rgba(148, 163, 184, 0.18) 0);
}

.agent-metric-ring.ring-critical {
    background:
        radial-gradient(closest-side, #fff 74%, transparent 76% 100%),
        conic-gradient(#dc2626 calc(var(--ring-value) * 1%), rgba(148, 163, 184, 0.18) 0);
}

.agent-metric-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.agent-metric-stats div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.88rem;
}

.agent-metric-stats span {
    color: var(--app-text-soft);
}

.agent-ip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 10rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.agent-ip-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.86rem;
}

.agent-ip-use {
    border: 0;
    background: var(--rj-cyan-soft);
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
}

.agent-ip-use:hover {
    background: rgba(56, 189, 248, 0.28);
}

.agent-spec-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.agent-spec-dl div {
    display: grid;
    grid-template-columns: 7.5rem 1fr;
    gap: 0.75rem;
    font-size: 0.88rem;
}

.agent-spec-dl dt {
    margin: 0;
    color: var(--app-text-soft);
    font-weight: 500;
}

.agent-spec-dl dd {
    margin: 0;
    font-weight: 600;
    color: var(--app-text);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.agent-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.agent-workspace-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.agent-workspace-side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 0;
    min-height: 100%;
    overflow: hidden;
}

.agent-panel {
    padding: 1.25rem 1.35rem;
    border-radius: calc(var(--app-radius) + 0.05rem);
    background: var(--app-surface-strong);
    border: 1px solid var(--app-border);
    box-shadow: 0 10px 28px rgba(10, 22, 40, 0.05);
}

.agent-panel-head.compact {
    margin-bottom: 0.65rem;
}

.agent-panel-head.compact h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}

.agent-ping-box {
    margin-top: 0.5rem;
}

.agent-ping-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
}

.agent-ping-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.agent-preset-chip {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: #fff;
    color: var(--app-text-soft);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
}

.agent-preset-chip:hover {
    border-color: rgba(234, 88, 12, 0.35);
    color: var(--rj-orange-dark);
    background: var(--app-primary-soft);
}

.agent-rdp-box {
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.agent-rdp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.agent-rdp-grid div {
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.agent-rdp-grid span {
    display: block;
    font-size: 0.75rem;
    color: var(--app-text-soft);
    margin-bottom: 0.2rem;
}

.agent-rdp-note {
    margin: 0.75rem 0 0;
    font-size: 0.84rem;
    color: var(--app-text-soft);
    line-height: 1.45;
}

.agent-capability-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1rem 0;
}

.agent-cap-chip {
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
}

.agent-cap-chip.on {
    background: var(--app-success-soft);
    color: #047857;
}

.agent-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.agent-action-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.agent-action-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-text-soft);
    font-weight: 700;
}

.agent-action-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.agent-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(234, 88, 12, 0.28);
    box-shadow: 0 8px 20px rgba(10, 22, 40, 0.06);
}

.agent-action-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.agent-action-btn.accent {
    border-color: rgba(34, 197, 94, 0.28);
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.9) 0%, #fff 100%);
}

.agent-action-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--app-text);
}

.agent-action-desc {
    font-size: 0.76rem;
    color: var(--app-text-soft);
    line-height: 1.35;
}

.agent-activity-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.agent-activity-panel .agent-panel-head {
    flex-shrink: 0;
}

.agent-activity-feed {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.35rem;
    margin-top: 0.75rem;
    scrollbar-gutter: stable;
}

.agent-activity-feed::-webkit-scrollbar {
    width: 6px;
}

.agent-activity-feed::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.45);
    border-radius: 999px;
}

.agent-activity-feed::-webkit-scrollbar-track {
    background: transparent;
}

.agent-activity-empty {
    padding: 1.25rem;
    border-radius: 0.9rem;
    background: rgba(248, 250, 252, 0.95);
    border: 1px dashed rgba(148, 163, 184, 0.28);
    font-size: 0.88rem;
    color: var(--app-text-soft);
    text-align: center;
}

.agent-activity-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 0.75rem;
    padding-bottom: 1rem;
    position: relative;
}

.agent-activity-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    bottom: 0;
    width: 2px;
    background: rgba(148, 163, 184, 0.2);
}

.agent-activity-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 4px;
    background: #94a3b8;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.18);
}

.agent-activity-item.is-success .agent-activity-marker { background: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18); }
.agent-activity-item.is-error .agent-activity-marker { background: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18); }
.agent-activity-item.is-running .agent-activity-marker { background: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18); }

.agent-activity-body {
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.agent-activity-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.agent-activity-top strong {
    font-size: 0.88rem;
}

.agent-activity-status {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.agent-activity-status.ok { background: var(--app-success-soft); color: #047857; }
.agent-activity-status.fail { background: var(--app-danger-soft); color: #b91c1c; }
.agent-activity-status.run { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.agent-activity-status.pending { background: rgba(148, 163, 184, 0.14); color: #475569; }

.agent-activity-body time {
    display: block;
    font-size: 0.75rem;
    color: var(--app-text-soft);
    margin-bottom: 0.35rem;
}

.agent-activity-body p {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--app-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.agent-activity-body p.agent-activity-pending {
    color: var(--app-text-soft);
    font-style: italic;
}

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

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

    .agent-workspace {
        grid-template-columns: 1fr;
    }

    .agent-workspace-side {
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .agent-activity-panel {
        height: auto;
        max-height: min(28rem, 55vh);
        overflow: hidden;
    }

    .agent-activity-feed {
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .agent-console-hero {
        flex-direction: column;
        padding: 1.25rem;
    }

    .agent-console-hero-actions {
        align-items: flex-start;
        width: 100%;
    }

    .agent-kpi-strip,
    .agent-monitor-row-pair {
        grid-template-columns: 1fr;
    }

    .agent-disk-grid {
        grid-template-columns: 1fr;
    }

    .agent-ip-list-wide {
        grid-template-columns: 1fr;
    }

    .agent-ping-row {
        grid-template-columns: 1fr;
    }

    .agent-spec-dl div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .agent-rdp-grid {
        grid-template-columns: 1fr;
    }
}

/* Agent list cards (Clientes) */
.agent-card-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.agent-list-card {
    position: relative;
    overflow: hidden;
}

.agent-list-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rj-navy) 0%, var(--rj-cyan) 55%, var(--rj-orange) 100%);
    opacity: 0.85;
}

.agent-list-card.has-disk-warning .agent-list-card-accent {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.agent-list-card.has-disk-critical .agent-list-card-accent {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.agent-list-card-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.agent-list-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(15, 35, 71, 0.08), rgba(56, 189, 248, 0.12));
    color: var(--rj-navy);
}

.agent-list-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.agent-list-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid transparent;
}

.agent-list-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.agent-list-status.is-online {
    background: rgba(34, 197, 94, 0.12);
    color: #047857;
    border-color: rgba(34, 197, 94, 0.22);
}

.agent-list-status.is-online .agent-list-status-dot {
    animation: agent-pulse 2s infinite;
}

.agent-list-status.is-offline {
    background: rgba(148, 163, 184, 0.14);
    color: #475569;
}

.agent-list-status.is-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.agent-list-status.is-pending {
    background: rgba(56, 189, 248, 0.14);
    color: #0369a1;
}

.agent-card-button:hover .agent-list-card,
.agent-card-button:focus-visible .agent-list-card {
    border-color: rgba(15, 35, 71, 0.18);
}

/* Legacy shared (edit modal, listagem) */
.agent-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.status-online {
    background: rgba(34, 197, 94, 0.18);
    color: #dcfce7;
    border-color: rgba(187, 247, 208, 0.4);
}

.status-offline {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
    border-color: rgba(226, 232, 240, 0.22);
}

.status-warning {
    background: rgba(250, 204, 21, 0.18);
    color: #fef3c7;
    border-color: rgba(253, 230, 138, 0.34);
}

.status-pending {
    background: rgba(59, 130, 246, 0.18);
    color: #dbeafe;
    border-color: rgba(191, 219, 254, 0.34);
}

.agent-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agent-modal-group {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 18px;
}

.agent-task-log {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
}

.agent-task-log + .agent-task-log {
    margin-top: 10px;
}

.agent-task-log-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.agent-task-log-meta {
    font-size: 0.82rem;
    color: #64748b;
}

.agent-task-log-message {
    font-size: 0.93rem;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
}

.task-log-success {
    border-left: 4px solid #16a34a;
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.96) 0%, rgba(255, 255, 255, 1) 100%);
}

.task-log-error {
    border-left: 4px solid #dc2626;
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.96) 0%, rgba(255, 255, 255, 1) 100%);
}

.task-log-running {
    border-left: 4px solid #2563eb;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.96) 0%, rgba(255, 255, 255, 1) 100%);
}

.task-log-pending {
    border-left: 4px solid #94a3b8;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 1) 100%);
}

.certificate-tag.danger {
    background: rgba(254, 226, 226, 0.95);
    color: #991b1b;
}

.agent-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(4px);
}

.edit-agent-modal-shell,
.agent-modal-shell {
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    padding: 24px;
}

.edit-agent-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.24);
}
