:root {
    --background: #f4f7f5;
    --surface: #ffffff;
    --surface-soft: #f9fbfa;
    --text: #15221b;
    --muted: #6d7972;
    --line: #e2e9e5;
    --green: #0a6748;
    --green-dark: #073f30;
    --green-soft: #e9f4ef;
    --danger: #b53d3d;
    --danger-soft: #fff0f0;
    --warning: #9a681f;
    --warning-soft: #fff6e8;
    --shadow: 0 18px 55px rgba(19, 52, 38, 0.08);
    --sidebar-width: 250px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 85% 5%,
            rgba(29, 127, 91, 0.06),
            transparent 30%
        ),
        var(--background);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.login-view {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-shell {
    width: min(1120px, 96vw);
    min-height: 680px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 35px 110px rgba(14, 49, 35, 0.15);
    backdrop-filter: blur(20px);
}

.login-art {
    padding: 58px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 10% 0,
            rgba(119, 220, 174, 0.3),
            transparent 34%
        ),
        linear-gradient(145deg, #0a6748, #062f25);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.brand small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    opacity: 0.66;
    text-transform: uppercase;
}

.brand-mark {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    border-radius: 14px;
    color: var(--green);
    background: #ffffff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.4px;
}

.login-kicker,
.eyebrow,
.panel-kicker,
.hero-kicker,
.topbar-context {
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.login-kicker {
    color: #9ed8bd;
}

.login-message h1 {
    margin: 16px 0 20px;
    font-size: clamp(43px, 5vw, 61px);
    line-height: 0.98;
    letter-spacing: -3.4px;
}

.login-message p {
    max-width: 500px;
    margin: 0;
    color: #d3e9df;
    font-size: 16px;
    line-height: 1.75;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #d5e9e0;
    font-size: 12px;
    font-weight: 650;
}

.security-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #72d9a9;
    box-shadow: 0 0 0 5px rgba(114, 217, 169, 0.12);
}

.login-form-area {
    padding: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-content {
    width: min(100%, 390px);
}

.eyebrow,
.panel-kicker,
.hero-kicker {
    color: var(--green);
}

.login-form-content h2 {
    margin: 13px 0 8px;
    font-size: 38px;
    letter-spacing: -1.6px;
}

.login-form-content > p {
    margin: 0 0 27px;
    line-height: 1.6;
}

.field-label {
    display: block;
    margin: 15px 0 7px;
    font-size: 12px;
    font-weight: 750;
}

.control {
    width: 100%;
    height: 47px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: var(--surface-soft);
    transition:
        border-color 0.18s,
        box-shadow 0.18s,
        background 0.18s;
}

.control:focus {
    border-color: var(--green);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 103, 72, 0.1);
}

.button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    transition:
        transform 0.16s,
        opacity 0.16s,
        background 0.16s;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.button-primary {
    border: 1px solid var(--green);
    color: #ffffff;
    background: var(--green);
}

.button-primary:hover:not(:disabled) {
    background: #075a3f;
}

.button-secondary {
    border: 1px solid var(--line);
    color: var(--green);
    background: #ffffff;
}

.button-block {
    width: 100%;
    margin-top: 23px;
}

.form-error {
    min-height: 18px;
    margin-top: 12px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 650;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    padding: 22px 15px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    z-index: 30;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 0 100%,
            rgba(63, 157, 118, 0.25),
            transparent 35%
        ),
        var(--green-dark);
}

.sidebar-brand {
    padding: 4px 7px 25px;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.nav-button {
    width: 100%;
    min-height: 43px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 0;
    border-radius: 12px;
    color: #c7dcd3;
    background: transparent;
    font-size: 13px;
    font-weight: 670;
    text-align: left;
    transition:
        color 0.15s,
        background 0.15s;
}

.nav-button:hover,
.nav-button.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    width: 20px;
    display: inline-grid;
    place-items: center;
    font-size: 16px;
}

.sidebar-engine {
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-engine small {
    display: block;
    color: #a9c6b9;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.sidebar-engine strong {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

.sidebar-engine span {
    display: block;
    margin-top: 4px;
    color: #a9c6b9;
    font-size: 10px;
    line-height: 1.4;
}

.sidebar-logout {
    margin-top: 10px;
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.main-area {
    min-width: 0;
}

.topbar {
    height: 70px;
    padding: 0 clamp(18px, 4vw, 55px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(226, 233, 229, 0.85);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 12px;
}

.topbar-actions {
    gap: 9px;
}

.topbar-context {
    display: block;
    color: #8a958f;
    font-size: 8px;
    letter-spacing: 1.4px;
}

.topbar-title {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    letter-spacing: -0.3px;
}

.icon-button {
    width: 39px;
    height: 39px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--green);
    background: #ffffff;
    font-size: 18px;
}

.mobile-menu-button {
    display: none;
}

.install-button {
    display: none;
}

.avatar {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 13px;
    font-weight: 900;
}

.content {
    width: min(100%, 1580px);
    margin: 0 auto;
    padding: 32px clamp(18px, 4vw, 55px) 70px;
}

.page-view {
    display: none;
}

.page-view.active {
    display: block;
}

.page-header {
    margin-bottom: 20px;
}

.page-header-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.page-header h1 {
    margin: 7px 0 6px;
    font-size: clamp(29px, 4vw, 39px);
    line-height: 1.05;
    letter-spacing: -1.9px;
}

.page-header p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-hero {
    min-height: 185px;
    padding: 29px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    overflow: hidden;
    position: relative;
    border: 1px solid #dfe9e4;
    border-radius: 23px;
    background:
        radial-gradient(
            circle at 95% 15%,
            rgba(39, 141, 101, 0.13),
            transparent 38%
        ),
        linear-gradient(130deg, #ffffff, #edf7f2);
}

.dashboard-hero h2 {
    margin: 8px 0 7px;
    font-size: 29px;
    letter-spacing: -1.1px;
}

.dashboard-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.status-pill {
    min-height: 29px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.status-online {
    color: var(--green);
    background: var(--green-soft);
}

.status-offline {
    color: var(--danger);
    background: var(--danger-soft);
}

.status-loading {
    color: var(--warning);
    background: var(--warning-soft);
}

.metric-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card,
.panel {
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 8px 32px rgba(19, 52, 38, 0.035);
}

.metric-card {
    min-height: 139px;
    padding: 20px;
}

.metric-card small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 680;
}

.metric-card strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 28px;
    line-height: 1;
    letter-spacing: -1px;
}

.metric-card span {
    color: #8a958f;
    font-size: 10px;
}

.panel {
    margin-top: 15px;
    padding: 22px;
}

.no-margin {
    margin: 0;
}

.panel h3 {
    margin: 6px 0;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.panel p {
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.detail-list,
.setting-list {
    margin-top: 17px;
    display: grid;
}

.detail-row,
.setting-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--line);
    font-size: 12px;
}

.detail-row span {
    color: var(--muted);
}

.detail-row strong {
    text-align: right;
}

.step-list {
    margin-top: 17px;
    display: grid;
    gap: 11px;
}

.step {
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.step > span {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: 0 0 29px;
    border-radius: 9px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 11px;
    font-weight: 900;
}

.step strong,
.step small {
    display: block;
}

.step strong {
    font-size: 12px;
}

.step small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.search-panel {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.form-field {
    min-width: 0;
}

.form-field > span {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 750;
}

.span-2 {
    grid-column: span 2;
}

.check-grid {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.check-option {
    min-height: 36px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft);
    color: #536159;
    font-size: 11px;
    font-weight: 650;
}

.check-option input {
    accent-color: var(--green);
}

.form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.button-spinner {
    width: 15px;
    height: 15px;
    margin-left: 8px;
    display: inline-block;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: spin 0.75s linear infinite;
}

.results-panel {
    min-height: 330px;
}

.empty-state {
    min-height: 275px;
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    color: var(--text);
    font-size: 14px;
}

.empty-state p {
    max-width: 470px;
    margin: 7px 0 0;
    font-size: 12px;
}

.empty-icon {
    width: 49px;
    height: 49px;
    margin-bottom: 14px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
}

.error-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.large-spinner {
    width: 39px;
    height: 39px;
    margin-bottom: 17px;
    border: 3px solid var(--green-soft);
    border-top-color: var(--green);
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

.results-header {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.results-header h3 {
    margin: 5px 0 3px;
}

.results-header p {
    margin: 0;
    font-size: 11px;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.data-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.data-table th {
    position: sticky;
    top: 0;
    color: #738078;
    background: #f8faf9;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.data-table td {
    color: #4f5d55;
    font-size: 11px;
    line-height: 1.45;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fbfdfc;
}

.company-cell strong,
.company-cell small,
.contact-line {
    display: block;
}

.company-cell strong {
    max-width: 270px;
    color: var(--text);
    font-size: 12px;
}

.company-cell small {
    max-width: 270px;
    margin-top: 4px;
    color: var(--muted);
}

.contact-line + .contact-line {
    margin-top: 3px;
}

.pagination {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
}

.pagination span {
    min-width: 100px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.credit-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 15px;
}

.credit-card {
    min-height: 220px;
    padding: 27px;
    border-radius: 20px;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 95% 0,
            rgba(111, 215, 166, 0.26),
            transparent 35%
        ),
        linear-gradient(145deg, #0a6748, #073f30);
}

.credit-card small {
    color: #c8dfd5;
}

.credit-card strong {
    display: block;
    margin: 13px 0 9px;
    font-size: 42px;
    letter-spacing: -1.5px;
}

.credit-card p {
    max-width: 390px;
    color: #c8dfd5;
}

.setting-row {
    min-height: 67px;
}

.setting-row strong,
.setting-row small {
    display: block;
}

.setting-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.toast {
    max-width: min(410px, calc(100vw - 30px));
    padding: 13px 16px;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    border-radius: 12px;
    color: #ffffff;
    background: #15221b;
    box-shadow: var(--shadow);
    font-size: 12px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition:
        opacity 0.2s,
        transform 0.2s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.mobile-overlay {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-art {
        min-height: 340px;
        padding: 38px;
    }

    .login-form-area {
        padding: 38px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: calc(var(--sidebar-width) * -1 - 20px);
        transition: left 0.22s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(0, 0, 0, 0.44);
    }

    .mobile-menu-button {
        display: grid;
    }

    .dashboard-grid,
    .credit-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .login-view {
        padding: 0;
    }

    .login-shell {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-art,
    .login-form-area {
        padding: 28px 22px;
    }

    .login-message h1 {
        font-size: 42px;
        letter-spacing: -2.4px;
    }

    .content {
        padding: 24px 15px 55px;
    }

    .topbar {
        padding: 0 15px;
    }

    .topbar .install-button {
        display: none !important;
    }

    .page-header-actions,
    .dashboard-hero,
    .results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .button {
        width: 100%;
    }

    .pagination {
        justify-content: center;
    }

    .pagination .button {
        padding: 0 11px;
    }
}

/* ===== UAI DATA CLIENTES FASE 2B ===== */

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

.client-list-panel {
    margin-top: 0;
}

.client-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.client-toolbar h3 {
    margin: 5px 0 0;
}

.client-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(460px, 100%);
}

.client-search-box .control {
    min-width: 250px;
}

.client-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
}

.client-identity strong,
.client-identity small {
    display: block;
}

.client-identity small {
    color: var(--muted);
    margin-top: 4px;
}

.client-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #e9f4ef;
    color: #0a6748;
    font-weight: 800;
}

.client-role-badge,
.client-status {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.client-role-badge {
    background: #eef2f0;
    color: #4d5c55;
}

.client-status-active {
    background: #e6f5ed;
    color: #087447;
}

.client-status-blocked {
    background: #fff0ef;
    color: #bd3e3e;
}

.client-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 270px;
}

.client-action-button {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #405048;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.client-action-button:hover {
    border-color: #0a6748;
    color: #0a6748;
}

.client-action-button.danger {
    border-color: #f0d5d2;
    color: #b23c3c;
}

.client-action-button.success {
    border-color: #cbe9d9;
    color: #087447;
}

.client-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 24px;
}

.client-modal.hidden {
    display: none;
}

.client-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 26, 19, 0.58);
    backdrop-filter: blur(8px);
}

.client-modal-card {
    position: relative;
    z-index: 1;
    width: min(620px, 96vw);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 34px 100px rgba(9, 36, 25, 0.28);
}

.client-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.client-modal-header h2 {
    margin: 7px 0 0;
    font-size: 27px;
}

.client-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.client-form-grid .span-2 {
    grid-column: span 2;
}

body.modal-open {
    overflow: hidden;
}

.restricted-page {
    display: none !important;
}

@media (max-width: 1100px) {
    .client-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .client-summary-grid {
        grid-template-columns: 1fr;
    }

    .client-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .client-search-box {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .client-search-box .control {
        min-width: 0;
    }

    .client-form-grid {
        grid-template-columns: 1fr;
    }

    .client-form-grid .span-2 {
        grid-column: span 1;
    }

    .client-modal-card {
        padding: 22px;
        border-radius: 20px;
    }
}

/* ===== UAI DATA EXPORTAÇÃO FASE 1A ===== */

.export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.export-actions .button {
    min-width: 135px;
}

.export-actions .button:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 680px) {
    .export-actions {
        width: 100%;
        justify-content: stretch;
    }

    .export-actions .button {
        flex: 1;
    }
}

/* ===== UAI DATA COMERCIAL 2C.2 + 2C.3 ===== */

.commercial-account-card {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.commercial-account-card > div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.commercial-account-card small,
.commercial-account-card strong {
    display: block;
}

.commercial-account-card small {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.commercial-account-card strong {
    color: #11251d;
    font-size: 18px;
}

.commercial-modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: grid;
    place-items: center;
    padding: 24px;
}

.commercial-modal.hidden {
    display: none;
}

.commercial-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 25, 18, 0.6);
    backdrop-filter: blur(8px);
}

.commercial-modal-card {
    position: relative;
    z-index: 1;
    width: min(720px, 96vw);
    max-height: calc(100vh - 42px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 24px;
    background: #fff;
    box-shadow:
        0 35px 100px
        rgba(6, 35, 24, 0.3);
}

.commercial-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.commercial-modal-header h2 {
    margin: 7px 0 3px;
}

.commercial-modal-header p {
    margin: 0;
    color: var(--muted);
}

.commercial-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.commercial-summary {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.commercial-summary > div {
    padding: 14px;
    border-radius: 14px;
    background: #f4f8f6;
}

.commercial-summary small,
.commercial-summary strong {
    display: block;
}

.commercial-summary small {
    margin-bottom: 6px;
    color: var(--muted);
}

.commercial-summary strong {
    overflow-wrap: anywhere;
    color: #0a6748;
}

.commercial-credit-box {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 17px;
}

.commercial-credit-box h3 {
    margin: 0 0 13px;
    font-size: 15px;
}

.commercial-credit-row {
    display: grid;
    grid-template-columns:
        1fr 1fr auto;
    gap: 10px;
}

.commercial-plan-button {
    border-color: #b9dfcf;
    color: #08714f;
}

@media (max-width: 760px) {
    .commercial-account-card,
    .commercial-summary,
    .commercial-form-grid {
        grid-template-columns: 1fr;
    }

    .commercial-credit-row {
        grid-template-columns: 1fr;
    }

    .commercial-modal-card {
        padding: 21px;
    }
}

/* ===== UAI DATA REVENDEDORES ADMIN ===== */

.uai-resellers-admin {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.uai-resellers-admin.loading {
    opacity: .62;
    pointer-events: none;
}

.uai-reseller-summary {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr))
        minmax(190px, .75fr);
    gap: 14px;
}

.uai-reseller-summary article {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dde7e2;
    border-radius: 19px;
    background: #fff;
    box-shadow:
        0 10px 30px
        rgba(11, 75, 54, .04);
}

.uai-reseller-summary article.action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.uai-reseller-summary span,
.uai-reseller-summary strong,
.uai-reseller-summary small {
    display: block;
}

.uai-reseller-summary span {
    color: #74827b;
    font-size: 11px;
    font-weight: 700;
}

.uai-reseller-summary strong {
    margin-top: 5px;
    color: #173328;
    font-size: 25px;
    letter-spacing: -.035em;
}

.uai-reseller-summary small {
    margin-top: 6px;
    color: #929d97;
    font-size: 10px;
}

.uai-reseller-table-card {
    overflow: hidden;
    border: 1px solid #dce6e1;
    border-radius: 21px;
    background: #fff;
    box-shadow:
        0 14px 38px
        rgba(11, 75, 54, .045);
}

.uai-reseller-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 21px;
    border-bottom: 1px solid #edf1ef;
}

.uai-reseller-table-head h3 {
    margin: 0;
    color: #173328;
    font-size: 16px;
}

.uai-reseller-table-head p {
    margin: 4px 0 0;
    color: #87928c;
    font-size: 11px;
}

.uai-reseller-table-scroll {
    overflow-x: auto;
}

.uai-reseller-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.uai-reseller-table th {
    padding: 12px 15px;
    color: #849089;
    background: #fafcfb;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.uai-reseller-table td {
    padding: 14px 15px;
    border-top: 1px solid #edf1ef;
    color: #334a40;
    font-size: 11px;
    vertical-align: middle;
}

.uai-reseller-table td strong,
.uai-reseller-table td small {
    display: block;
}

.uai-reseller-table td small {
    margin-top: 3px;
    color: #8a9690;
    font-size: 9px;
}

.uai-reseller-table td.empty {
    padding: 44px;
    color: #8a9690;
    text-align: center;
}

.uai-reseller-person {
    display: flex;
    align-items: center;
    gap: 11px;
}

.uai-reseller-avatar {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #087253;
    background: #e8f4ee;
    font-size: 12px;
    font-weight: 900;
}

.uai-reseller-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.uai-reseller-status.active {
    color: #087253;
    background: #e7f4ee;
}

.uai-reseller-status.blocked {
    color: #b24c4c;
    background: #fbecec;
}

.uai-reseller-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.uai-reseller-icon-button,
.uai-reseller-button {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition:
        transform .15s ease,
        opacity .15s ease,
        background .15s ease;
}

.uai-reseller-icon-button:hover,
.uai-reseller-button:hover {
    transform: translateY(-1px);
}

.uai-reseller-icon-button {
    padding: 7px 9px;
    border: 1px solid #dce6e1;
    border-radius: 9px;
    color: #1f5b47;
    background: #fff;
    font-size: 9px;
}

.uai-reseller-icon-button.danger {
    color: #af4f4f;
}

.uai-reseller-button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 10px;
}

.uai-reseller-button.primary {
    color: #fff;
    background: #087253;
}

.uai-reseller-button.secondary {
    color: #176148;
    border: 1px solid #dce6e1;
    background: #fff;
}

.uai-reseller-button:disabled {
    cursor: wait;
    opacity: .65;
}

.uai-reseller-modal-backdrop {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(8, 33, 24, .38);
    backdrop-filter: blur(5px);
}

.uai-reseller-modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 26px 80px
        rgba(7, 52, 37, .25);
}

.uai-reseller-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 22px 17px;
    border-bottom: 1px solid #edf1ef;
}

.uai-reseller-modal-head span {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .15em;
}

.uai-reseller-modal-head h3 {
    margin: 6px 0 0;
    color: #173328;
    font-size: 20px;
}

.uai-reseller-close {
    width: 34px;
    height: 34px;
    border: 1px solid #e0e7e3;
    border-radius: 10px;
    color: #466157;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
}

.uai-reseller-modal form {
    padding: 20px 22px 22px;
}

.uai-reseller-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.uai-reseller-form-grid label {
    display: grid;
    gap: 6px;
}

.uai-reseller-form-grid label.full {
    grid-column: 1 / -1;
}

.uai-reseller-form-grid label span {
    color: #354c42;
    font-size: 10px;
    font-weight: 800;
}

.uai-reseller-form-grid input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
    outline: 0;
    color: #233c31;
    background: #fbfdfc;
    font: inherit;
    font-size: 11px;
}

.uai-reseller-form-grid input:focus {
    border-color: #57a58b;
    box-shadow:
        0 0 0 3px
        rgba(8, 114, 83, .09);
}

.uai-reseller-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}

.uai-reseller-toast {
    position: fixed;
    z-index: 100000;
    right: 20px;
    bottom: 20px;
    max-width: min(360px, calc(100vw - 40px));
    padding: 13px 16px;
    border-radius: 13px;
    color: #fff;
    background: #087253;
    box-shadow:
        0 16px 45px
        rgba(6, 53, 38, .25);
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition:
        opacity .2s ease,
        transform .2s ease;
}

.uai-reseller-toast.error {
    background: #b44e4e;
}

.uai-reseller-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1000px) {
    .uai-reseller-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .uai-reseller-summary {
        grid-template-columns: 1fr;
    }

    .uai-reseller-table-head {
        align-items: stretch;
        flex-direction: column;
    }

    .uai-reseller-form-grid {
        grid-template-columns: 1fr;
    }

    .uai-reseller-form-grid label.full {
        grid-column: auto;
    }
}

/* ===== REVENDEDORES POR CRÉDITOS V1 ===== */

.resellers-toolbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.resellers-metrics {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.resellers-panel {
    overflow: hidden;
}

.resellers-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e8eeeb;
}

.resellers-panel-header h3 {
    margin: 5px 0 0;
}

.resellers-panel-header p {
    margin: 6px 0 0;
    color: #7f8d86;
    font-size: 12px;
}

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

.resellers-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.resellers-table th {
    padding: 12px 16px;
    color: #7e8c85;
    background: #fafcfb;
    font-size: 10px;
    text-align: left;
    text-transform: uppercase;
}

.resellers-table td {
    padding: 15px 16px;
    border-top: 1px solid #edf1ef;
    font-size: 12px;
}

.resellers-table td strong,
.resellers-table td small {
    display: block;
}

.resellers-table td small {
    margin-top: 4px;
    color: #89958f;
}

.resellers-empty {
    padding: 42px !important;
    color: #89958f;
    text-align: center;
}

.resellers-actions {
    display: flex;
    gap: 7px;
}

.table-action {
    padding: 7px 9px;
    border: 1px solid #dbe5e0;
    border-radius: 9px;
    color: #17664c;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}

.table-action.danger {
    color: #b14f4f;
}

.status-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.status-chip.success {
    color: #087253;
    background: #e7f4ee;
}

.status-chip.danger {
    color: #b24d4d;
    background: #fbecec;
}

.reseller-modal-backdrop {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(7, 34, 24, .4);
    backdrop-filter: blur(5px);
}

.reseller-modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 25px 80px rgba(6, 50, 35, .25);
}

.reseller-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 22px 17px;
    border-bottom: 1px solid #edf1ef;
}

.reseller-modal-header h3 {
    margin: 5px 0 0;
}

.reseller-modal-header p {
    margin: 7px 0 0;
    color: #7e8c85;
    font-size: 12px;
}

.modal-close {
    width: 35px;
    height: 35px;
    border: 1px solid #dfe7e3;
    border-radius: 10px;
    color: #486158;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
}

.reseller-modal form {
    padding: 20px 22px 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field span {
    font-size: 11px;
    font-weight: 700;
}

.field input {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
    outline: none;
    background: #fbfdfc;
}

.field input:focus {
    border-color: #58a78c;
    box-shadow: 0 0 0 3px rgba(8, 114, 83, .09);
}

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

.credit-purchase-preview {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 11px;
    color: #17664c;
    background: #edf7f2;
    font-size: 11px;
    font-weight: 700;
}

.reseller-toast {
    position: fixed;
    z-index: 100000;
    right: 20px;
    bottom: 20px;
    max-width: calc(100vw - 40px);
    padding: 13px 16px;
    border-radius: 13px;
    color: #fff;
    background: #087253;
    box-shadow: 0 15px 45px rgba(6, 53, 38, .25);
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    transition: .2s ease;
}

.reseller-toast.error {
    background: #b44f4f;
}

.reseller-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .resellers-toolbar {
        flex-direction: column;
    }

    .resellers-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }
}

/* ===== UAI DATA REVENDA R4 PREMIUM ===== */

.r4-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(
            circle at 88% 5%,
            rgba(255,255,255,.18),
            transparent 31%
        ),
        linear-gradient(
            135deg,
            #0b7655,
            #064d39
        );
    box-shadow:
        0 18px 50px
        rgba(6, 73, 52, .16);
}

.r4-hero h2 {
    margin: 7px 0 0;
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.04em;
}

.r4-hero p {
    margin: 8px 0 0;
    color: rgba(255,255,255,.72);
    font-size: 12px;
}

.r4-eyebrow {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

.r4-hero .r4-eyebrow {
    color: rgba(255,255,255,.7);
}

.r4-primary-action {
    flex: 0 0 auto;
    min-height: 43px;
    padding-inline: 18px;
    color: #07533e !important;
    background: #fff !important;
}

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

.r4-metric {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dfe8e3;
    border-radius: 19px;
    background: #fff;
    box-shadow:
        0 11px 34px
        rgba(11, 75, 54, .045);
}

.r4-metric span,
.r4-metric strong,
.r4-metric small {
    display: block;
}

.r4-metric span {
    color: #78867f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.r4-metric strong {
    margin-top: 7px;
    color: #173328;
    font-size: 25px;
    letter-spacing: -.035em;
}

.r4-metric small {
    margin-top: 6px;
    color: #939e98;
    font-size: 10px;
}

.r4-panel {
    overflow: hidden;
}

.r4-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #e8eeeb;
}

.r4-panel-header h3 {
    margin: 5px 0 0;
}

.r4-panel-header p {
    margin: 6px 0 0;
    color: #7e8c85;
    font-size: 11px;
}

.r4-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.r4-search {
    display: flex;
    align-items: center;
    min-width: 230px;
    min-height: 39px;
    padding: 0 11px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
    background: #fbfdfc;
}

.r4-search span {
    color: #829089;
}

.r4-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 11px;
}

.r4-select {
    min-height: 39px;
    padding: 0 11px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
    color: #345046;
    background: #fff;
    font-size: 11px;
}

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

.r4-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.r4-table th {
    padding: 12px 15px;
    color: #7e8c85;
    background: #fafcfb;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-align: left;
    text-transform: uppercase;
}

.r4-table td {
    padding: 14px 15px;
    border-top: 1px solid #edf1ef;
    color: #31483e;
    font-size: 11px;
    vertical-align: middle;
}

.r4-table td strong,
.r4-table td small {
    display: block;
}

.r4-table td small {
    margin-top: 3px;
    color: #8b9791;
    font-size: 9px;
}

.r4-person {
    display: flex;
    align-items: center;
    gap: 11px;
}

.r4-person.large {
    align-items: flex-start;
}

.r4-person h3 {
    margin: 4px 0 0;
}

.r4-person p {
    margin: 4px 0 0;
    color: #829089;
    font-size: 11px;
}

.r4-avatar {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #087253;
    background: #e7f4ee;
    font-size: 12px;
    font-weight: 900;
}

.r4-person.large .r4-avatar {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
}

.r4-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
}

.r4-status.active {
    color: #087253;
    background: #e7f4ee;
}

.r4-status.blocked {
    color: #b24c4c;
    background: #fbecec;
}

.r4-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.r4-action {
    padding: 7px 9px;
    border: 1px solid #dce5e1;
    border-radius: 9px;
    color: #205c48;
    background: #fff;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
}

.r4-action.primary {
    color: #fff;
    border-color: #087253;
    background: #087253;
}

.r4-empty {
    padding: 44px !important;
    color: #89958f !important;
    text-align: center;
}

.r4-backdrop {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(7, 33, 24, .42);
    backdrop-filter: blur(6px);
}

.r4-modal {
    width: min(570px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 23px;
    background: #fff;
    box-shadow:
        0 28px 85px
        rgba(5, 47, 33, .26);
}

.r4-modal-header,
.r4-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 22px 17px;
    border-bottom: 1px solid #edf1ef;
}

.r4-modal-header h3 {
    margin: 5px 0 0;
}

.r4-modal-header p {
    margin: 6px 0 0;
    color: #7e8c85;
    font-size: 11px;
}

.r4-close {
    width: 35px;
    height: 35px;
    border: 1px solid #dfe7e3;
    border-radius: 10px;
    color: #486158;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
}

.r4-modal form {
    padding: 20px 22px 22px;
}

.r4-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.r4-field {
    display: grid;
    gap: 6px;
}

.r4-field.full {
    grid-column: 1 / -1;
}

.r4-field span {
    color: #344c41;
    font-size: 10px;
    font-weight: 800;
}

.r4-field input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
    outline: 0;
    color: #263f34;
    background: #fbfdfc;
    font: inherit;
    font-size: 11px;
}

.r4-field input:focus {
    border-color: #58a78c;
    box-shadow:
        0 0 0 3px
        rgba(8, 114, 83, .09);
}

.r4-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
}

.r4-preview {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 11px;
    color: #17664c;
    background: #edf7f2;
    font-size: 11px;
    font-weight: 800;
}

.r4-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(610px, 100%);
    height: 100%;
    overflow: auto;
    background: #f6faf8;
    box-shadow:
        -20px 0 70px
        rgba(5, 47, 33, .18);
}

.r4-drawer-header {
    position: sticky;
    z-index: 2;
    top: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
}

.r4-drawer-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.r4-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.r4-detail-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dfe8e3;
    border-radius: 16px;
    background: #fff;
}

.r4-detail-card span,
.r4-detail-card strong,
.r4-detail-card small {
    display: block;
}

.r4-detail-card span {
    color: #7c8982;
    font-size: 9px;
    font-weight: 800;
}

.r4-detail-card strong {
    margin-top: 6px;
    color: #173328;
    font-size: 18px;
}

.r4-detail-card small {
    margin-top: 4px;
    color: #929d97;
    font-size: 9px;
}

.r4-detail-section {
    overflow: hidden;
    border: 1px solid #dfe8e3;
    border-radius: 18px;
    background: #fff;
}

.r4-detail-section > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 16px;
    border-bottom: 1px solid #edf1ef;
}

.r4-detail-section h4 {
    margin: 5px 0 0;
    color: #1c392d;
}

.r4-count {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #087253;
    background: #e7f4ee;
    font-size: 10px;
    font-weight: 900;
}

.r4-commercial-summary {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: #edf1ef;
}

.r4-commercial-summary > div {
    padding: 15px;
    background: #fff;
}

.r4-commercial-summary span,
.r4-commercial-summary strong {
    display: block;
}

.r4-commercial-summary span {
    color: #839089;
    font-size: 9px;
}

.r4-commercial-summary strong {
    margin-top: 5px;
    color: #213b30;
    font-size: 13px;
}

.r4-list {
    display: grid;
}

.r4-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-top: 1px solid #edf1ef;
}

.r4-list-item:first-child {
    border-top: 0;
}

.r4-list-item strong,
.r4-list-item small {
    display: block;
}

.r4-list-item strong {
    color: #2a4238;
    font-size: 11px;
}

.r4-list-item small {
    margin-top: 3px;
    color: #8b9791;
    font-size: 9px;
}

.r4-list-value {
    flex: 0 0 auto;
    text-align: right;
}

.r4-list-value.positive strong {
    color: #087253;
}

.r4-list-value.negative strong {
    color: #b24c4c;
}

.r4-list-empty {
    padding: 30px 16px;
    color: #89958f;
    font-size: 11px;
    text-align: center;
}

.r4-drawer-footer {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 10px;
}

.button-danger {
    color: #fff;
    background: #b34d4d;
}

.r4-toast {
    position: fixed;
    z-index: 100000;
    right: 20px;
    bottom: 20px;
    max-width: calc(100vw - 40px);
    padding: 13px 16px;
    border-radius: 13px;
    color: #fff;
    background: #087253;
    box-shadow:
        0 16px 45px
        rgba(6, 53, 38, .25);
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    transition: .2s ease;
}

.r4-toast.error {
    background: #b44e4e;
}

.r4-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1100px) {
    .r4-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .r4-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .r4-panel-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .r4-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .r4-primary-action {
        width: 100%;
    }

    .r4-metrics,
    .r4-detail-grid,
    .r4-commercial-summary {
        grid-template-columns: 1fr;
    }

    .r4-panel-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .r4-search {
        min-width: 0;
    }

    .r4-form-grid {
        grid-template-columns: 1fr;
    }

    .r4-field.full {
        grid-column: auto;
    }

    .r4-drawer-body {
        padding: 12px;
    }
}

/* ===== DASHBOARD DO REVENDEDOR V1 ===== */

#page-dashboard.reseller-dashboard-active
    > :not(#resellerDashboard) {
    display: none !important;
}

.reseller-dashboard {
    display: grid;
    gap: 14px;
}

.rd-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 210px;
    padding: 28px;
    overflow: hidden;
    border-radius: 26px;
    color: #fff;
    background:
        radial-gradient(
            circle at 89% 5%,
            rgba(255,255,255,.2),
            transparent 32%
        ),
        radial-gradient(
            circle at 66% 100%,
            rgba(255,255,255,.1),
            transparent 37%
        ),
        linear-gradient(
            135deg,
            #0b7755,
            #054936
        );
    box-shadow:
        0 22px 58px
        rgba(6, 72, 51, .18);
}

.rd-eyebrow,
.rd-panel-kicker {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

.rd-hero .rd-eyebrow {
    color: rgba(255,255,255,.68);
}

.rd-hero h1 {
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(27px, 4vw, 40px);
    letter-spacing: -.045em;
}

.rd-hero p {
    margin: 10px 0 0;
    color: rgba(255,255,255,.7);
    font-size: 12px;
}

.rd-status-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 20px;
    color: rgba(255,255,255,.8);
    font-size: 10px;
    font-weight: 800;
}

.rd-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #84f0bd;
    box-shadow:
        0 0 0 5px
        rgba(132,240,189,.12);
}

.rd-wallet-card {
    flex: 0 0 230px;
    padding: 21px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 21px;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(13px);
}

.rd-wallet-card span,
.rd-wallet-card strong,
.rd-wallet-card small {
    display: block;
}

.rd-wallet-card span {
    color: rgba(255,255,255,.68);
    font-size: 10px;
    font-weight: 800;
}

.rd-wallet-card strong {
    margin-top: 7px;
    color: #fff;
    font-size: 34px;
    letter-spacing: -.045em;
}

.rd-wallet-card small {
    margin-top: 2px;
    color: rgba(255,255,255,.65);
    font-size: 10px;
}

.rd-wallet-card button {
    width: 100%;
    min-height: 37px;
    margin-top: 18px;
    border: 0;
    border-radius: 11px;
    color: #07533e;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.rd-metrics {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.rd-metric {
    min-width: 0;
    padding: 19px;
    border: 1px solid #dfe8e3;
    border-radius: 20px;
    background: #fff;
    box-shadow:
        0 12px 36px
        rgba(11,75,54,.045);
}

.rd-metric span,
.rd-metric strong,
.rd-metric small {
    display: block;
}

.rd-metric span {
    color: #7a8881;
    font-size: 10px;
    font-weight: 800;
}

.rd-metric strong {
    margin-top: 7px;
    color: #173328;
    font-size: 25px;
    letter-spacing: -.04em;
}

.rd-metric small {
    margin-top: 6px;
    color: #929d97;
    font-size: 9px;
}

.rd-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(300px, .65fr);
    gap: 14px;
}

.rd-panel {
    overflow: hidden;
    border: 1px solid #dfe8e3;
    border-radius: 21px;
    background: #fff;
    box-shadow:
        0 12px 38px
        rgba(11,75,54,.045);
}

.rd-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 19px;
    border-bottom: 1px solid #edf1ef;
}

.rd-panel-header h3 {
    margin: 5px 0 0;
    color: #1c392d;
    font-size: 15px;
}

.rd-panel-header p {
    margin: 5px 0 0;
    color: #829089;
    font-size: 10px;
}

.rd-count {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #087253;
    background: #e7f4ee;
    font-size: 10px;
    font-weight: 900;
}

.rd-limit-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px 14px;
    padding: 15px 19px;
    border-bottom: 1px solid #edf1ef;
    background: #fbfdfc;
}

.rd-limit-box span {
    color: #7f8d86;
    font-size: 9px;
}

.rd-limit-box strong {
    display: block;
    margin-top: 4px;
    color: #213b30;
    font-size: 12px;
}

.rd-progress {
    grid-column: 1 / -1;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5ece8;
}

.rd-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #0a7654,
            #49aa83
        );
}

.rd-list,
.rd-history-list {
    display: grid;
}

.rd-list-row,
.rd-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
    border-top: 1px solid #edf1ef;
}

.rd-list-row:first-child,
.rd-history-row:first-child {
    border-top: 0;
}

.rd-client {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rd-avatar {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #087253;
    background: #e7f4ee;
    font-size: 11px;
    font-weight: 900;
}

.rd-client strong,
.rd-client small,
.rd-row-value strong,
.rd-row-value small,
.rd-history-description strong,
.rd-history-description small {
    display: block;
}

.rd-client strong,
.rd-history-description strong {
    overflow: hidden;
    color: #2a4238;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rd-client small,
.rd-history-description small {
    margin-top: 3px;
    color: #8b9791;
    font-size: 9px;
}

.rd-row-value {
    flex: 0 0 auto;
    text-align: right;
}

.rd-row-value strong {
    color: #2b4439;
    font-size: 11px;
}

.rd-row-value small {
    margin-top: 3px;
    color: #8b9791;
    font-size: 8px;
}

.rd-row-value.positive strong {
    color: #087253;
}

.rd-row-value.negative strong {
    color: #b24c4c;
}

.rd-finance-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #edf1ef;
}

.rd-finance-item {
    padding: 17px;
    background: #fff;
}

.rd-finance-item span,
.rd-finance-item strong {
    display: block;
}

.rd-finance-item span {
    color: #829089;
    font-size: 9px;
}

.rd-finance-item strong {
    margin-top: 6px;
    color: #213b30;
    font-size: 15px;
}

.rd-balance-summary {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-top: 1px solid #edf1ef;
    background: #f8fbf9;
}

.rd-balance-summary > div {
    padding: 13px;
    border-radius: 14px;
    background: #fff;
}

.rd-balance-summary span,
.rd-balance-summary strong,
.rd-balance-summary small {
    display: block;
}

.rd-balance-summary span {
    color: #829089;
    font-size: 9px;
}

.rd-balance-summary strong {
    margin-top: 5px;
    color: #087253;
    font-size: 17px;
}

.rd-balance-summary small {
    margin-top: 2px;
    color: #8b9791;
    font-size: 8px;
}

.rd-history-row {
    justify-content: flex-start;
}

.rd-history-icon {
    display: grid;
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 900;
}

.rd-history-icon.positive {
    color: #087253;
    background: #e7f4ee;
}

.rd-history-icon.negative {
    color: #b24c4c;
    background: #fbecec;
}

.rd-history-description {
    flex: 1;
    min-width: 0;
}

.rd-empty {
    padding: 32px 18px;
    color: #89958f;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 1100px) {
    .rd-metrics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .rd-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .rd-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .rd-wallet-card {
        flex-basis: auto;
    }

    .rd-metrics,
    .rd-finance-grid,
    .rd-balance-summary {
        grid-template-columns: 1fr;
    }
}

/* ===== REVENDEDOR MEUS CLIENTES ===== */

#page-clientes.reseller-clients-active
    > :not(#resellerClientsApp) {
    display: none !important;
}

#resellerClientsApp {
    display: grid;
    gap: 14px;
}

.rc-header,
.rc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.rc-header {
    padding: 4px 0;
}

.rc-header h1 {
    margin: 7px 0 0;
    font-size: 34px;
}

.rc-header p,
.rc-panel-head p {
    color: #7a8881;
    font-size: 11px;
}

.rc-kicker {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .15em;
}

.rc-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.rc-metric {
    padding: 18px;
    border: 1px solid #dfe8e3;
    border-radius: 19px;
    background: #fff;
}

.rc-metric span,
.rc-metric strong,
.rc-metric small {
    display: block;
}

.rc-metric span {
    color: #7a8881;
    font-size: 10px;
    font-weight: 800;
}

.rc-metric strong {
    margin-top: 7px;
    font-size: 24px;
}

.rc-metric small {
    margin-top: 5px;
    color: #929d97;
    font-size: 9px;
}

.rc-panel {
    overflow: hidden;
}

.rc-panel-head {
    padding: 18px 20px;
    border-bottom: 1px solid #e8eeeb;
}

.rc-tools {
    display: flex;
    gap: 8px;
}

.rc-tools input {
    min-width: 230px;
    min-height: 39px;
    padding: 0 11px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
}

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

.rc-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.rc-table th,
.rc-table td {
    padding: 13px 15px;
    text-align: left;
}

.rc-table th {
    color: #7e8c85;
    background: #fafcfb;
    font-size: 9px;
}

.rc-table td {
    border-top: 1px solid #edf1ef;
    font-size: 11px;
}

.rc-table strong,
.rc-table small {
    display: block;
}

.rc-table small {
    margin-top: 3px;
    color: #8b9791;
    font-size: 9px;
}

.rc-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
}

.rc-status.active {
    color: #087253;
    background: #e7f4ee;
}

.rc-status.blocked {
    color: #b24c4c;
    background: #fbecec;
}

.rc-credit-button {
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #087253;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
}

.rc-empty {
    padding: 40px !important;
    text-align: center !important;
}

.rc-backdrop {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(7,33,24,.42);
    backdrop-filter: blur(6px);
}

.rc-modal {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 22px;
    background: #fff;
}

.rc-modal.compact {
    width: min(450px, 100%);
}

.rc-modal > header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #edf1ef;
}

.rc-modal > header h3 {
    margin: 5px 0 0;
}

.rc-modal > header p {
    color: #7e8c85;
    font-size: 11px;
}

.rc-modal > header button {
    width: 35px;
    height: 35px;
    border: 1px solid #dfe7e3;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.rc-modal form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
    padding: 20px 22px 22px;
}

.rc-modal label {
    display: grid;
    gap: 6px;
}

.rc-modal label span {
    font-size: 10px;
    font-weight: 800;
}

.rc-modal input,
.rc-modal select {
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
}

.rc-modal footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.rc-toast {
    position: fixed;
    z-index: 100000;
    right: 20px;
    bottom: 20px;
    padding: 13px 16px;
    border-radius: 13px;
    color: #fff;
    background: #087253;
    opacity: 0;
    transform: translateY(12px);
    transition: .2s ease;
}

.rc-toast.error {
    background: #b44e4e;
}

.rc-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .rc-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rc-panel-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 650px) {
    .rc-header,
    .rc-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .rc-metrics,
    .rc-modal form {
        grid-template-columns: 1fr;
    }

    .rc-tools input {
        min-width: 0;
    }
}

/* ===== CADASTRO TESTE GRÁTIS V1 ===== */

.trial-signup-entry {
    margin-top: 14px;
    text-align: center;
}

.trial-signup-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #98a39d;
    font-size: 10px;
}

.trial-signup-divider::before,
.trial-signup-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e7e3;
}

.trial-signup-button {
    width: 100%;
    min-height: 42px;
    border: 1px solid #087253;
    border-radius: 11px;
    color: #087253;
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
}

.trial-signup-button:hover {
    background: #eef8f3;
}

.trial-signup-entry p {
    margin: 9px 0 0;
    color: #87938d;
    font-size: 9px;
}

.trial-signup-entry strong {
    color: #087253;
}

.trial-signup-backdrop {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(7,33,24,.43);
    backdrop-filter: blur(6px);
}

.trial-signup-modal {
    width: min(500px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 23px;
    background: #fff;
    box-shadow:
        0 28px 85px
        rgba(5,47,33,.27);
}

.trial-signup-modal > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 23px 18px;
    border-bottom: 1px solid #edf1ef;
}

.trial-signup-modal > header span {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

.trial-signup-modal > header h3 {
    margin: 6px 0 0;
    color: #173328;
    font-size: 22px;
}

.trial-signup-modal > header p {
    margin: 7px 0 0;
    color: #7c8982;
    font-size: 11px;
    line-height: 1.55;
}

.trial-signup-modal > header button {
    width: 35px;
    height: 35px;
    border: 1px solid #dfe7e3;
    border-radius: 10px;
    color: #486158;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
}

.trial-signup-modal form {
    display: grid;
    gap: 13px;
    padding: 20px 23px 23px;
}

.trial-signup-modal label {
    display: grid;
    gap: 6px;
}

.trial-signup-modal label span {
    color: #344c41;
    font-size: 10px;
    font-weight: 800;
}

.trial-signup-modal input {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
    outline: 0;
    color: #263f34;
    background: #fbfdfc;
    font: inherit;
    font-size: 11px;
}

.trial-signup-modal input:focus {
    border-color: #58a78c;
    box-shadow:
        0 0 0 3px
        rgba(8,114,83,.09);
}

.trial-signup-benefits {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 3px;
}

.trial-signup-benefits > div {
    padding: 11px;
    border-radius: 13px;
    background: #edf7f2;
    text-align: center;
}

.trial-signup-benefits strong,
.trial-signup-benefits span {
    display: block;
}

.trial-signup-benefits strong {
    color: #087253;
    font-size: 12px;
}

.trial-signup-benefits span {
    margin-top: 3px;
    color: #76847d;
    font-size: 8px;
}

.trial-signup-modal footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 6px;
}

.trial-signup-toast {
    position: fixed;
    z-index: 100001;
    right: 20px;
    bottom: 20px;
    max-width: calc(100vw - 40px);
    padding: 13px 16px;
    border-radius: 13px;
    color: #fff;
    background: #087253;
    box-shadow:
        0 16px 45px
        rgba(6,53,38,.25);
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transform: translateY(12px);
    transition: .2s ease;
}

.trial-signup-toast.error {
    background: #b44e4e;
}

.trial-signup-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 540px) {
    .trial-signup-benefits {
        grid-template-columns: 1fr;
    }

    .trial-signup-modal footer {
        flex-direction: column-reverse;
    }

    .trial-signup-modal footer button {
        width: 100%;
    }
}

/* ===== SUPORTE PARA CRÉDITOS ESGOTADOS ===== */

.credit-finished-backdrop,
.support-whatsapp-backdrop {
    position: fixed;
    z-index: 100010;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(7,33,24,.44);
    backdrop-filter: blur(6px);
}

.credit-finished-modal,
.support-whatsapp-modal {
    width: min(480px, 100%);
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 28px 85px rgba(5,47,33,.28);
}

.credit-finished-modal {
    padding: 26px;
    text-align: center;
}

.credit-finished-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 13px;
    place-items: center;
    border-radius: 15px;
    color: #b34d4d;
    background: #fbecec;
    font-size: 22px;
    font-weight: 900;
}

.credit-finished-modal > span,
.support-whatsapp-modal > header span {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .15em;
}

.credit-finished-modal h2 {
    margin: 8px 0 0;
    color: #173328;
}

.credit-finished-modal p {
    margin: 9px 0 0;
    color: #77857e;
    font-size: 11px;
    line-height: 1.55;
}

.credit-finished-support {
    margin: 18px 0;
    padding: 13px;
    border-radius: 13px;
    background: #edf7f2;
}

.credit-finished-support small,
.credit-finished-support strong {
    display: block;
}

.credit-finished-support small {
    color: #7e8c85;
    font-size: 9px;
}

.credit-finished-support strong {
    margin-top: 4px;
    color: #087253;
}

.credit-finished-actions {
    display: grid;
    gap: 8px;
}

.credit-finished-actions a,
.credit-finished-actions button {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.support-whatsapp-settings-button {
    margin-bottom: 14px;
    padding: 10px 13px;
    border: 1px solid #087253;
    border-radius: 11px;
    color: #087253;
    background: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.support-whatsapp-modal > header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 22px 17px;
    border-bottom: 1px solid #edf1ef;
}

.support-whatsapp-modal > header h3 {
    margin: 5px 0 0;
}

.support-whatsapp-modal > header p {
    color: #7e8c85;
    font-size: 11px;
}

.support-whatsapp-modal > header button {
    width: 35px;
    height: 35px;
    border: 1px solid #dfe7e3;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.support-whatsapp-modal form {
    display: grid;
    gap: 14px;
    padding: 20px 22px 22px;
}

.support-whatsapp-modal label {
    display: grid;
    gap: 6px;
}

.support-whatsapp-modal label span {
    font-size: 10px;
    font-weight: 800;
}

.support-whatsapp-modal input {
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid #dce5e1;
    border-radius: 11px;
}

.support-whatsapp-modal footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.support-credit-toast {
    position: fixed;
    z-index: 100011;
    right: 20px;
    bottom: 20px;
    padding: 13px 16px;
    border-radius: 13px;
    color: #fff;
    background: #087253;
    opacity: 0;
    transform: translateY(12px);
    transition: .2s ease;
}

.support-credit-toast.error {
    background: #b44e4e;
}

.support-credit-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.password-manager-backdrop{position:fixed;z-index:100002;inset:0;display:grid;place-items:center;padding:20px;background:rgba(7,33,24,.43);backdrop-filter:blur(6px)}.password-manager-modal{width:min(510px,100%);border-radius:22px;background:#fff;overflow:hidden}.password-manager-modal>header{display:flex;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #edf1ef}.password-manager-modal>header span{color:#087253;font-size:9px;font-weight:900}.password-manager-modal>header button{width:35px;height:35px;border:1px solid #dfe7e3;border-radius:10px;background:#fff}.password-manager-modal form,.password-result{padding:20px 22px}.password-manager-modal label{display:grid;gap:7px}.password-manager-modal select{min-height:43px;border:1px solid #dce5e1;border-radius:11px}.password-manager-modal footer{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}.password-result{display:flex;align-items:center;justify-content:space-between;gap:12px}.password-result strong{font-family:monospace;color:#087253;font-size:16px}

/* UAI_DATA_PLAN_ADMIN_V1 */
.plan-admin-panel{margin-top:24px;padding:24px;border:1px solid #e2e8f0;border-radius:22px;background:#fff;box-shadow:0 16px 42px rgba(15,23,42,.06)}
.plan-admin-head{display:flex;justify-content:space-between;gap:20px}.plan-admin-head h2{margin:5px 0}.plan-admin-head p{margin:0;color:#64748b}
.plan-primary{border:0;border-radius:12px;padding:11px 17px;background:#0f8f66;color:#fff;font-weight:800;cursor:pointer}
.plan-admin-tabs{display:flex;gap:8px;margin:22px 0}.plan-admin-tabs button{border:1px solid #dbe4ea;background:#f8fafc;border-radius:999px;padding:9px 16px}.plan-admin-tabs button.active{background:#0f172a;color:#fff}
.plan-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.plan-admin-card{padding:20px;border:1px solid #e2e8f0;border-radius:18px;background:#fff}.plan-admin-card.featured{border-color:#0f8f66}.plan-admin-card.inactive{opacity:.65}
.plan-card-meta{display:flex;justify-content:space-between;font-size:11px;font-weight:800}.plan-card-meta b{color:#0f8f66}.plan-admin-card h3{margin:13px 0 1px}.plan-admin-card>small{color:#94a3b8}.plan-admin-card p{min-height:40px;color:#64748b}.plan-price{display:flex;gap:9px;align-items:baseline}.plan-price strong{font-size:25px}.plan-price del{color:#94a3b8}
.plan-actions{display:flex;gap:7px;flex-wrap:wrap}.plan-actions button{border:1px solid #dbe4ea;background:#f8fafc;border-radius:9px;padding:8px 10px}.plan-actions .danger{color:#b42318}
.plan-modal{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.58);display:flex;align-items:center;justify-content:center;padding:20px}.plan-dialog{width:min(800px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;padding:22px}.plan-dialog header{display:flex;justify-content:space-between}.plan-dialog header button{border:0;background:none;font-size:28px}.plan-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.plan-dialog label{display:grid;gap:6px;font-size:13px;font-weight:700;margin-top:11px}.plan-dialog input,.plan-dialog select,.plan-dialog textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:10px}.plan-dialog textarea{min-height:84px}.plan-check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}.plan-check input{width:auto}.plan-save{width:100%;margin-top:18px}.plan-error{padding:15px;background:#fff1f2;color:#b42318}
@media(max-width:700px){.plan-admin-head{display:grid}.plan-form-grid{grid-template-columns:1fr}}

/* UAI_DATA_PLAN_TABLE_PREMIUM_V1 */

.plan-table-shell {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid #dde7e2;
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 16px 42px
        rgba(15, 23, 42, .055);
}

.plan-table-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
}

.plan-table-kicker {
    color: #087253;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

.plan-table-header h2 {
    margin: 6px 0 0;
    color: #173328;
    font-size: 21px;
}

.plan-table-header p {
    margin: 6px 0 0;
    color: #718078;
    font-size: 11px;
}

.plan-table-primary,
.plan-table-secondary {
    min-height: 39px;
    padding: 0 14px;
    border-radius: 11px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.plan-table-primary {
    border: 1px solid #087253;
    color: #fff;
    background: #087253;
}

.plan-table-secondary {
    border: 1px solid #d9e3de;
    color: #315046;
    background: #fff;
}

.plan-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 24px;
    border-top: 1px solid #edf1ef;
    border-bottom: 1px solid #edf1ef;
    background: #fafcfb;
}

.plan-table-tabs {
    display: flex;
    gap: 7px;
}

.plan-table-tabs button {
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #dbe4df;
    border-radius: 999px;
    color: #4c6359;
    background: #fff;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
}

.plan-table-tabs button.active {
    color: #fff;
    border-color: #173328;
    background: #173328;
}

.plan-table-filters {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-table-search {
    display: flex;
    align-items: center;
    min-width: 210px;
    min-height: 37px;
    padding: 0 10px;
    border: 1px solid #dbe4df;
    border-radius: 10px;
    background: #fff;
}

.plan-table-search span {
    color: #819087;
}

.plan-table-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 10px;
}

.plan-table-filters select {
    min-height: 37px;
    padding: 0 10px;
    border: 1px solid #dbe4df;
    border-radius: 10px;
    color: #40564c;
    background: #fff;
    font-size: 10px;
}

.plan-table-summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 24px;
    color: #7e8b84;
    background: #fff;
    font-size: 9px;
}

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

.plan-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
}

.plan-table th {
    padding: 11px 14px;
    color: #7c8a83;
    background: #fafcfb;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.plan-table td {
    padding: 13px 14px;
    border-top: 1px solid #edf1ef;
    color: #30473d;
    font-size: 10px;
    vertical-align: middle;
}

.plan-table td strong,
.plan-table td small {
    display: block;
}

.plan-table td small {
    margin-top: 3px;
    color: #8b9791;
    font-size: 8px;
}

.plan-table-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 190px;
}

.plan-table-name span {
    padding: 4px 7px;
    border-radius: 999px;
    color: #087253;
    background: #e7f4ee;
    font-size: 7px;
    font-weight: 900;
    white-space: nowrap;
}

.plan-table-billing {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 8px;
    color: #365348;
    background: #eef3f0;
    font-size: 8px;
    font-weight: 800;
}

.plan-old-price {
    text-decoration: line-through;
}

.plan-table-status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
}

.plan-table-status.active {
    color: #087253;
    background: #e7f4ee;
}

.plan-table-status.inactive {
    color: #95681b;
    background: #fff5dc;
}

.plan-table-status.archived {
    color: #8a5050;
    background: #f8e9e9;
}

.plan-table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.plan-table-actions button {
    padding: 6px 8px;
    border: 1px solid #dbe4df;
    border-radius: 8px;
    color: #315046;
    background: #fff;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
}

.plan-table-actions button.danger {
    color: #b34d4d;
}

.plan-table-empty,
.plan-table-loading,
.plan-table-error {
    padding: 38px !important;
    color: #7d8983;
    text-align: center;
}

.plan-table-error {
    color: #b34d4d;
}

.plan-table-backdrop {
    position: fixed;
    z-index: 100003;
    inset: 0;
    display: grid;
    padding: 20px;
    place-items: center;
    background: rgba(7, 33, 24, .43);
    backdrop-filter: blur(6px);
}

.plan-table-dialog {
    width: min(780px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 22px;
    border-radius: 22px;
    background: #fff;
    box-shadow:
        0 28px 85px
        rgba(5, 47, 33, .27);
}

.plan-table-dialog > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf1ef;
}

.plan-table-dialog > header h3 {
    margin: 6px 0 0;
}

.plan-table-dialog > header button {
    width: 35px;
    height: 35px;
    border: 1px solid #dfe7e3;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 20px;
}

.plan-table-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 13px;
    margin-top: 17px;
}

.plan-table-dialog label {
    display: grid;
    gap: 6px;
}

.plan-table-dialog label > span {
    color: #344c41;
    font-size: 9px;
    font-weight: 800;
}

.plan-table-dialog input,
.plan-table-dialog select,
.plan-table-dialog textarea {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid #dce5e1;
    border-radius: 10px;
    outline: 0;
    color: #263f34;
    background: #fbfdfc;
    font: inherit;
    font-size: 10px;
}

.plan-table-dialog textarea {
    min-height: 82px;
    padding-top: 10px;
    resize: vertical;
}

.plan-table-check {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    align-content: center;
    gap: 8px !important;
    min-height: 40px;
}

.plan-table-check input {
    width: auto;
    min-height: auto;
}

.plan-table-description {
    margin-top: 13px;
}

.plan-table-dialog footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 17px;
}

@media (max-width: 850px) {
    .plan-table-header,
    .plan-table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .plan-table-filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 620px) {
    .plan-table-form-grid {
        grid-template-columns: 1fr;
    }

    .plan-table-tabs,
    .plan-table-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .plan-table-search {
        min-width: 0;
    }
}

.national-beta-notice {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(17, 94, 89, 0.18);
    background: rgba(236, 253, 245, 0.78);
    margin-bottom: 16px;
}

.national-beta-notice strong {
    color: #065f46;
}

.national-beta-notice span {
    color: #475569;
    font-size: 0.9rem;
}
