:root {
    --ev-primary: #7448ff;
    --ev-secondary: #f5f3ff;
    --ev-text: #15192c;
    --ev-muted: #6b6f80;
    --ev-border: #e2e4f0;
    --lead-input-height: 48px;
    --lead-input-radius: 10px;
    --lead-input-border: #dad8f0;
    --lead-input-bg: #ffffff;
    --lead-input-shadow: 0 8px 18px rgba(22, 6, 54, 0.07);
    font-family: 'Inter', sans-serif;
}

body {
    margin: 0;
    background-color: #f8f9fc;
    color: var(--ev-text);
    font-family: 'Inter', sans-serif;
}

body:not(.login-page) input:not([type="password"]):not([type="number"]):not([type="date"]):not([type="datetime-local"]):not([type="time"]):not(.currency-input):not(.cpf-input):not([name="email"]):not([data-preserve-case="true"]) {
    text-transform: uppercase;
}

input[name="email"] {
    text-transform: none;
}

textarea[data-uppercase]:not([data-preserve-case]) {
    text-transform: uppercase;
}

input[data-preserve-case="true"],
textarea[data-preserve-case="true"] {
    text-transform: none !important;
}

.ev-body {
    background: #f6f4ff;
}

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

.app-sidebar {
    width: 280px;
    flex: 0 0 280px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background:
        radial-gradient(circle at top, rgba(116, 72, 255, 0.16), transparent 28%),
        linear-gradient(180deg, #0f0226 0%, #16003d 54%, #120033 100%);
    color: #fff;
    padding: 1.35rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    box-shadow:
        inset -1px 0 0 rgba(255, 255, 255, 0.05),
        18px 0 45px rgba(8, 4, 31, 0.16);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s ease, flex-basis 0.25s ease, padding 0.25s ease, transform 0.25s ease;
    z-index: 20;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0 1.1rem;
    margin-bottom: 0.15rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 150px;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.3));
    transition: width 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
}

.sidebar-brand span {
    font-size: 0.85rem;
    color: #c9c5ff;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-label {
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    color: rgba(255, 255, 255, 0.42);
    margin: 0 0 0.15rem;
    font-weight: 700;
    padding-left: 0.7rem;
    transition: opacity 0.18s ease, max-height 0.2s ease, margin 0.2s ease;
}

.sidebar-section nav,
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-menu {
    flex: 1;
    min-height: 0;
    gap: 0.4rem;
}

.sidebar-section nav a,
.sidebar-link {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    padding: 0.82rem 0.95rem;
    border-radius: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.sidebar-section nav a i,
.sidebar-link i,
.sidebar-submenu summary i {
    width: 19px;
    height: 19px;
    min-width: 19px;
    stroke-width: 2;
    transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    opacity: 0.92;
}

.sidebar-menu > a:nth-of-type(1) i {
    color: #60a5fa;
}

.sidebar-menu > a:nth-of-type(2) i {
    color: #34d399;
}

.sidebar-menu > a:nth-of-type(3) i {
    color: #fbbf24;
}

.sidebar-menu > a:nth-of-type(4) i {
    color: #f87171;
}

.sidebar-menu > a:nth-of-type(5) i {
    color: #22c55e;
}

.sidebar-menu > a:nth-of-type(6) i {
    color: #c084fc;
}

.sidebar-menu > a:nth-of-type(7) i {
    color: #38bdf8;
}

.sidebar-submenu summary i {
    color: #a78bfa;
}

.logout-link i {
    color: #fb7185;
}

.sidebar-section nav a span,
.sidebar-link span,
.sidebar-submenu summary span {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.18s ease, width 0.2s ease, margin 0.2s ease;
}

.sidebar-section nav a::before,
.sidebar-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sidebar-section nav a.active,
.sidebar-section nav a:hover,
.sidebar-link.active,
.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-section nav a:hover::before,
.sidebar-section nav a.active::before,
.sidebar-link:hover::before,
.sidebar-link.active::before {
    opacity: 1;
}

.sidebar-section nav a:hover,
.sidebar-link:hover {
    transform: translateX(3px);
}

.sidebar-section nav a.active,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.16),
        0 10px 22px rgba(8, 4, 31, 0.18);
    transform: translateX(3px);
}

.sidebar-section nav a:hover i,
.sidebar-section nav a.active i,
.sidebar-link:hover i,
.sidebar-link.active i,
.sidebar-submenu summary:hover i {
    transform: translateX(1px);
    filter: brightness(1.08);
}

.sidebar-submenu {
    border-radius: 18px;
    padding: 0.2rem 0.25rem 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sidebar-submenu summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 0.82rem 0.95rem;
    border-radius: 12px;
}

.sidebar-submenu__summary-main {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-submenu summary::-webkit-details-marker {
    display: none;
}

.sidebar-submenu summary::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #ffffff;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.sidebar-submenu:not([open]) summary::before {
    transform: rotate(-90deg);
}

.sidebar-submenu > nav {
    margin-top: 0.15rem;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-submenu > nav a {
    font-size: 0.88rem;
    padding: 0.62rem 0.8rem;
    color: rgba(255, 255, 255, 0.78);
    border-radius: 12px;
    transition: opacity 0.18s ease, max-height 0.2s ease, padding 0.2s ease, margin 0.2s ease;
}

.sidebar-submenu > nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.logout-link {
    margin-top: auto;
    margin-bottom: 0.2rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

.logout-link:hover {
    color: #fff;
}

.sidebar-version {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0 0.5rem;
    letter-spacing: 0.05em;
    user-select: none;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f6f4ff;
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 0.5rem;
    gap: 1rem;
}

.page-heading {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
}

.page-title {
    margin: 0;
    font-size: 1.9rem;
    color: #1f1a35;
    text-align: center;
}

.page-subtitle {
    margin: 0;
    color: #7a7694;
    text-align: center;
}

.user-chip {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(28, 9, 74, 0.08);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(109, 53, 245, 0.08);
    color: #5c34d6;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}

.topbar-logout:hover {
    background: rgba(109, 53, 245, 0.16);
    color: #4621b4;
    transform: translateY(-1px);
}

.topbar-logout i {
    width: 16px;
    height: 16px;
}

.user-chip .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ev-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-info .greeting {
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.user-info .role {
    font-size: 12px;
    color: #888;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.1);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.sidebar-toggle span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #0f1022;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(0, 0, 0, 0.3);
}

.app-shell.sidebar-collapsed .app-sidebar {
    width: 82px;
    flex-basis: 82px;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    overflow: visible;
}

.app-shell.sidebar-collapsed .app-main {
    margin-left: 82px;
    width: auto;
}

.app-shell.sidebar-collapsed .topbar {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.app-shell.sidebar-collapsed .sidebar-brand {
    padding-top: 0.7rem;
    padding-bottom: 0.85rem;
}

.app-shell.sidebar-collapsed .sidebar-logo {
    width: 42px;
    transform: scale(0.96);
}

.app-shell.sidebar-collapsed .sidebar-label {
    opacity: 0;
    max-height: 0;
    margin: 0;
    overflow: hidden;
    padding-left: 0;
}

.app-shell.sidebar-collapsed .sidebar-link,
.app-shell.sidebar-collapsed .sidebar-section nav a,
.app-shell.sidebar-collapsed .sidebar-submenu summary {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    gap: 0;
}

.app-shell.sidebar-collapsed .sidebar-link span,
.app-shell.sidebar-collapsed .sidebar-section nav a span,
.app-shell.sidebar-collapsed .sidebar-submenu__summary-main span,
.app-shell.sidebar-collapsed .sidebar-submenu summary::before {
    opacity: 0;
    visibility: hidden;
    width: 0;
    margin: 0;
    overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar-submenu {
    position: relative;
    background: transparent;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

.app-shell.sidebar-collapsed .sidebar-submenu__summary-main {
    gap: 0;
}

.app-shell.sidebar-collapsed .sidebar-submenu summary .sidebar-submenu__summary-main {
    opacity: 1;
    visibility: visible;
    width: auto;
    margin: 0;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-submenu summary .sidebar-submenu__summary-main i {
    opacity: 0.92;
}

.app-shell.sidebar-collapsed .sidebar-submenu > nav {
    position: absolute;
    top: 0;
    left: calc(100% + 0.85rem);
    min-width: 240px;
    max-height: none;
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    margin-top: 0;
    padding: 0.55rem;
    gap: 0.35rem;
    pointer-events: none;
    background: linear-gradient(180deg, #1f2146 0%, #171936 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(10, 12, 32, 0.34);
    z-index: 40;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    transform: translateX(-6px);
}

.app-shell.sidebar-collapsed .sidebar-submenu:hover > nav,
.app-shell.sidebar-collapsed .sidebar-submenu:focus-within > nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.app-shell.sidebar-collapsed .sidebar-submenu > nav a {
    white-space: nowrap;
    justify-content: flex-start;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

.app-shell.sidebar-collapsed .sidebar-submenu > nav::before {
    content: "Configuração";
    display: block;
    padding: 0.35rem 0.85rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.app-shell.sidebar-collapsed .logout-link {
    justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
    opacity: 0;
}

.app-shell.sidebar-collapsed .sidebar-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.app-shell.sidebar-collapsed .sidebar-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}
.ev-button {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.2s ease;
}

.ev-button.primary {
    background: var(--ev-primary);
    color: #fff;
}

.ev-button.secondary {
    background: #e9e9ff;
    color: #3a2bb5;
    box-shadow: inset 0 0 0 1px rgba(76, 64, 159, 0.08);
}

.ev-button.ghost {
    background: var(--ev-secondary);
    color: var(--ev-primary);
}

.ev-button.is-disabled,
.ev-button.is-disabled:hover {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

.ev-button.danger {
    background: #ffe7ea;
    color: #b4232b;
}

.ev-button.danger:hover {
    opacity: 0.85;
}

.ev-button.full {
    width: 100%;
}

.ev-main {
    padding: 1.5rem 2rem 2.5rem;
}

.ev-section {
    margin-bottom: 2rem;
}

.dashboard-filter {
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
    gap: 1rem;
    align-items: stretch;
}

.filter-body {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.mode-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filter-fields-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.reports-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
    padding: 2rem;
    border: 1px solid rgba(16, 23, 77, 0.08);
    background: radial-gradient(circle at 20% 20%, rgba(116, 72, 255, 0.12), transparent 55%), #fff;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.72rem;
    color: var(--ev-muted);
    margin-bottom: 0.65rem;
    display: block;
}

.reports-hero h2 {
    margin: 0;
    font-size: 1.85rem;
}

.reports-hero p {
    margin: 0.4rem 0 0;
    color: #646483;
    max-width: 560px;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.hero-chip {
    border: 1px solid rgba(116, 72, 255, 0.22);
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: rgba(116, 72, 255, 0.04);
}

.hero-chip span {
    font-size: 0.75rem;
    color: var(--ev-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.2rem;
}

.hero-chip strong {
    font-size: 1.1rem;
    color: #1f1a39;
}

.report-filter-card {
    border: 1px solid rgba(116, 72, 255, 0.1);
    background: radial-gradient(circle at top right, rgba(116, 72, 255, 0.08), transparent 55%), #fff;
}

.report-filter-card .card-header h2 {
    margin-bottom: 0.25rem;
}

.report-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
    margin-top: 0.5rem;
    align-items: flex-end;
}

.report-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.report-filter-field label {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ev-muted);
    font-weight: 600;
}

@media (max-width: 760px) {
    .topbar {
        align-items: flex-start;
        padding: 1.25rem 1rem 0.5rem;
    }

    .page-heading {
        width: 100%;
        gap: 0.25rem;
    }
}

.report-filter-field .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #c92a2a;
    font-size: 0.78rem;
}

.report-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.4rem;
}

.report-filter-actions .ev-button {
    min-width: 150px;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.report-results-card {
    overflow: hidden;
}

.report-table-wrapper {
    margin-top: 0.35rem;
}

.report-table {
    table-layout: auto;
}

.report-table__cell--currency,
.report-table__cell--percentage {
    white-space: nowrap;
}

.report-table__cell--integer {
    white-space: nowrap;
    text-align: center;
}

.report-table__cell--signatures {
    white-space: nowrap;
}

.report-results-card--evbalcao .card-header + .report-table-wrapper {
    margin-top: 0.6rem;
}

.report-table-wrapper--evbalcao {
    border: 1px solid rgba(22, 28, 45, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.report-table--evbalcao,
.report-table--evbalcao-summary {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.report-table--evbalcao thead th,
.report-table--evbalcao-summary thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.78rem 0.9rem;
    background: linear-gradient(180deg, #f8faff 0%, #eef2fb 100%);
    border-bottom: 1px solid rgba(179, 190, 214, 0.32);
    color: #5c6880;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.report-table--evbalcao tbody td,
.report-table--evbalcao-summary tbody td {
    padding: 0.82rem 0.9rem;
    color: #162033;
    font-size: 0.93rem;
    font-weight: 500;
    line-height: 1.25;
    border-bottom: 1px solid rgba(220, 226, 240, 0.72);
    vertical-align: middle;
    background: transparent;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-table--evbalcao tbody tr:hover td,
.report-table--evbalcao-summary tbody tr:hover td {
    background: rgba(244, 247, 255, 0.88);
}

.report-table--evbalcao .report-table__cell--empresa {
    width: 9%;
    white-space: nowrap;
    font-weight: 700;
    color: #2f3e57;
}

.report-table--evbalcao .report-table__cell--plan_type {
    width: 11%;
    white-space: nowrap;
}

.report-table--evbalcao .report-table__cell--vigencia {
    width: 8%;
    white-space: nowrap;
    text-align: center;
}

.report-table--evbalcao .report-table__cell--beneficiary {
    width: 19%;
}

.report-table--evbalcao .report-table__cell--cpf {
    width: 10%;
    white-space: nowrap;
}

.report-table--evbalcao .report-table__cell--seller_name {
    width: 23%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-weight: 600;
}

.report-table--evbalcao .report-table__cell--table_premium,
.report-table--evbalcao .report-table__cell--net_premium {
    width: 10%;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.report-table--evbalcao-summary .report-table__cell--number {
    width: 5%;
    text-align: center;
    white-space: nowrap;
}

.report-table--evbalcao-summary .report-table__cell--collaborator {
    width: 29%;
    white-space: nowrap;
    font-weight: 600;
}

.report-table--evbalcao-summary .report-table__cell--group_total,
.report-table--evbalcao-summary .report-table__cell--direct_sale_total,
.report-table--evbalcao-summary .report-table__cell--producer_total,
.report-table--evbalcao-summary .report-table__cell--subtotal_total,
.report-table--evbalcao-summary .report-table__cell--net_total {
    width: 11%;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.report-table--evbalcao-summary .report-table__cell--absence_count {
    width: 6%;
    text-align: center;
    white-space: nowrap;
}

.report-table--evbalcao-summary .report-table__cell--signatures {
    width: 10%;
}

.report-results-card--evbalcao .stat-grid {
    gap: 0.9rem;
}

.report-results-card--evbalcao .stat-card {
    border: 1px solid rgba(22, 28, 45, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1280px) {
    .report-table--evbalcao,
    .report-table--evbalcao-summary {
        min-width: 1080px;
    }
}

@media (max-width: 760px) {
    .report-table-wrapper--evbalcao {
        border-radius: 14px;
    }

    .report-table--evbalcao,
    .report-table--evbalcao-summary {
        min-width: 980px;
    }

    .report-table--evbalcao thead th,
    .report-table--evbalcao-summary thead th,
    .report-table--evbalcao tbody td,
    .report-table--evbalcao-summary tbody td {
        padding: 0.72rem 0.78rem;
    }
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(76, 64, 159, 0.35);
    border-radius: 999px;
}

.report-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.report-catalog-grid .catalog-card {
    border: 1px solid rgba(18, 24, 72, 0.08);
    border-radius: 18px;
    padding: 1.25rem;
    background: linear-gradient(145deg, #fdfcff, #f5f4ff);
    box-shadow: 0 18px 40px rgba(24, 7, 70, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.report-catalog-grid .catalog-card header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.65rem;
}

.report-catalog-grid .catalog-card header .muted {
    font-size: 0.78rem;
    color: var(--ev-muted);
}

.report-catalog-grid .catalog-card.is-active {
    border-color: var(--ev-primary);
    box-shadow: 0 30px 60px rgba(116, 72, 255, 0.2);
    transform: translateY(-3px);
}

.tag-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
}

.chart-grid .card {
    border: 1px solid rgba(115, 109, 155, 0.12);
}

.chart-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.chart-card li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
}

.chart-card li strong {
    font-size: 1rem;
}
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.api-card {
    border-radius: 18px;
    background: linear-gradient(145deg, #fdfbff, #f3f0ff);
    border: 1px solid rgba(138, 118, 199, 0.2);
    padding: 1.25rem;
    box-shadow: 0 24px 50px rgba(34, 6, 71, 0.12);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.api-card header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.api-card header span {
    font-size: 0.78rem;
    color: #7a6da8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.api-card__meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.3rem;
}
.api-card__tag {
    background: rgba(116, 72, 255, 0.12);
    color: #4f2ac7;
    border-radius: 999px;
    padding: 0.15rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 960px) {
    .reports-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-highlights {
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

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

    .report-filter-actions .ev-button {
        width: 100%;
    }
}

.dashboard-filter .filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--ev-muted);
}

.dashboard-filter .filter-field span {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    color: var(--ev-muted);
}

.dashboard-filter .filter-field select {
    border-radius: 14px;
    border: 1px solid var(--ev-border);
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
    background: #fff;
}

.dashboard-filter .filter-field small {
    font-size: 0.74rem;
}

.dashboard-filter .filter-field.is-disabled {
    opacity: 0.5;
}

.dashboard-filter .filter-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.dashboard-filter .filter-actions .ev-button {
    padding: 0.5rem 1.2rem;
}

.filter-summary {
    border-radius: 18px;
    background: linear-gradient(140deg, #211845, #352766);
    color: #fff;
    padding: 1rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    justify-content: center;
}

.filter-summary strong {
    font-size: 1.4rem;
    color: #fff;
}

.filter-summary span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 900px) {
    .dashboard-filter {
        grid-template-columns: 1fr;
    }
    .dashboard-filter .filter-actions {
        width: 100%;
    }
    .dashboard-filter .filter-actions .ev-button {
        flex: 1;
        justify-content: center;
    }
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.objective-board {
    margin: 1.75rem 0 2rem;
}

.objective-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.objective-card {
    background: var(--objective-color, #4f46e5);
    color: #fff;
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(20, 18, 33, 0.15);
    min-height: 120px;
}

.objective-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.objective-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.objective-card__label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    opacity: 0.9;
}

.objective-card__body strong {
    font-size: 2rem;
    line-height: 1.1;
}

.objective-card__body small {
    font-size: 0.75rem;
    opacity: 0.85;
}

.stat-card {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgba(41, 10, 70, 0.08);
}

.pipeline-hero .stat-card {
    padding: 1.35rem 1.5rem 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 170px;
}

.stat-card-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--ev-secondary);
    color: var(--ev-primary);
    font-weight: 600;
}

.stat-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ev-muted);
}

.pipeline-hero .stat-card p {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #60708a;
}

.stat-card strong {
    display: block;
    font-size: 2.2rem;
    margin-top: 0.6rem;
    color: #1a1338;
}

.pipeline-hero .stat-card strong {
    font-size: clamp(1.1rem, 0.9rem + 0.9vw, 1.7rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-top: 0.55rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.stat-card span {
    color: #8d8aa7;
}

.pipeline-hero .stat-card span {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #8b86a8;
}

.stat-subinfo {
    display: block;
    font-size: 0.8rem;
    color: #7b7a92;
    margin-top: 0.2rem;
}

.tab-bar {
    display: inline-flex;
    background: #f1edff;
    border-radius: 16px;
    padding: 0.3rem;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-bar a {
    text-decoration: none;
    color: #7f7a97;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
}

.tab-bar a.active {
    background: #fff;
    color: #1d1737;
    box-shadow: 0 12px 20px rgba(40, 9, 80, 0.15);
}

.tab-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.8rem;
    background: #fff;
    padding: 0.4rem;
    border-radius: 16px;
    box-shadow: 0 18px 35px rgba(23, 9, 78, 0.12);
}

.pill-button {
    border-radius: 12px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #1d1737;
    font-weight: 600;
    background: #f7f5ff;
}

.pill-button.primary {
    background: var(--ev-primary);
    color: #fff;
}

.pill-toggle,
.mode-row .pill-toggle {
    display: inline-flex;
    background: linear-gradient(120deg, #efe8ff, #f9f7ff);
    border-radius: 18px;
    padding: 0.25rem;
    gap: 0.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.pill-option {
    cursor: pointer;
    display: inline-flex;
}

.pill-option input {
    display: none;
}

.pill-option span {
    display: block;
    text-decoration: none;
    color: #a69fd0;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.pill-option input:checked + span {
    background: #fff;
    color: #1e1638;
    box-shadow: 0 18px 30px rgba(40, 9, 80, 0.18);
}

.pipeline-hero {
    background: linear-gradient(180deg, rgba(115,85,255,0.18), transparent);
    border-radius: 28px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 25px 50px rgba(26, 15, 80, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.manager-form {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.manager-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.manager-grid-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    column-gap: 0.75rem;
    row-gap: 1rem;
    justify-content: center;
}

.manager-grid-row .seller-field {
    max-width: 170px;
    width: 100%;
    justify-self: center;
}

.manager-grid-add {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

.manager-add-row {
    border: 1px solid rgba(116, 72, 255, 0.45);
    background: #fff;
    color: var(--ev-primary);
    padding: 0.55rem 1.6rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: none;
    letter-spacing: 0;
}

.manager-add-row:hover {
    background: rgba(116, 72, 255, 0.08);
}

@media (max-width: 1120px) {
    .manager-grid-row {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 720px) {
    .manager-grid {
        gap: 1rem;
    }

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

    .manager-grid-row .seller-field {
        max-width: none;
        justify-self: stretch;
    }
}

.badge {
    background: var(--ev-secondary);
    color: var(--ev-primary);
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
}

.metric strong {
    font-size: 1.8rem;
}

.label {
    color: var(--ev-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.list, .ranking {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li, .ranking li {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--ev-border);
}

.list.compact li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    align-items: center;
}

.ranking.highlight li {
    border: none;
    background: #f7f5ff;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 0.6rem;
}

.tag {
    background: var(--ev-secondary);
    color: var(--ev-primary);
    border-radius: 999px;
    padding: 0.2rem 0.8rem;
    font-size: 0.75rem;
}

.tag.danger {
    background: #ffe1e1;
    color: #d93737;
}

.ev-table {
    width: 100%;
    border-collapse: collapse;
}

.ev-table th, .ev-table td {
    text-align: left;
    padding: 0.9rem;
    border-bottom: 1px solid var(--ev-border);
}

.ev-table th:last-child,
.ev-table td:last-child {
    text-align: right;
}

.table-actions {
    white-space: nowrap;
}

.table-edit-btn {
    border: none;
    background: #f0ecff;
    color: #5c3fbf;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.table-edit-btn:hover {
    background: #e2d7ff;
    transform: translateY(-1px);
}

.meta-feedback {
    margin-bottom: 1rem;
}

.ev-table tr.danger {
    background: #fff4f4;
}

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

.filters label {
    display: block;
    font-size: 0.85rem;
    color: var(--ev-muted);
    margin-bottom: 0.2rem;
}

.filters select, .filters input {
    width: 100%;
    padding: 0.6rem;
    border-radius: 12px;
    border: 1px solid var(--ev-border);
}

.funil-toolbar {
    display: grid;
    grid-template-columns: 1fr 140px 180px 180px;
    gap: 0.8rem;
    align-items: center;
}

.search-input {
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--ev-border);
    padding: 0.4rem 0.8rem;
}

.search-input input {
    border: none;
    width: 100%;
    font-size: 1rem;
    outline: none;
}

.funil-toolbar select {
    border-radius: 14px;
    border: 1px solid var(--ev-border);
    padding: 0.65rem;
    background: #fff;
}

.view-toggle {
    display: inline-flex;
    background: #f1edff;
    border-radius: 14px;
    padding: 0.2rem;
}

.view-toggle button {
    border: none;
    background: transparent;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #6f6b85;
}

.view-toggle button.active {
    background: var(--ev-primary);
    color: #fff;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.timeline-card {
    background: #f7f5ff;
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-kanban {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    background: #f9f7ff;
    border-radius: 16px;
    padding: 1rem;
}

.card-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.kanban-column {
    background: #faf9ff;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: inset 0 0 0 1px #f0edff;
}

.kanban-column-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.stage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.kanban-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(34, 11, 71, 0.08);
    padding: 0.8rem;
    margin-bottom: 0.8rem;
}

.kanban-card strong {
    display: block;
    margin-bottom: 0.3rem;
}

.empty-state {
    color: var(--ev-muted);
    font-size: 0.85rem;
}

.form-grid {
    display: grid;
    gap: 0.75rem;
}

.form-grid.tight {
    gap: 0.35rem;
}

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

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 0.65rem;
    border-radius: 12px;
    border: 1px solid var(--ev-border);
}

.form-grid label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ev-muted);
}

.ev-messages {
    list-style: none;
    padding: 0.6rem 1rem;
    border-radius: 16px;
    background: var(--ev-secondary);
    color: var(--ev-primary);
    margin: 0 0 1rem;
}

.list.compact li {
    font-size: 0.9rem;
    align-items: center;
}

.pagination ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding: 0;
}

.pagination a {
    text-decoration: none;
    color: var(--ev-primary);
}

.progress {
    width: 100%;
    height: 10px;
    background: var(--ev-secondary);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.progress div {
    height: 100%;
    background: var(--ev-primary);
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(2rem, 6vh, 4.5rem) 1.5rem 2rem;
    background-color: #0a2f6d;
    background-image: url("../img/fundo-ev.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-card {
    width: min(420px, 100%);
    text-align: center;
}

.login-panel {
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 30px;
    padding: 2rem;
    box-shadow: 0 35px 70px rgba(61, 35, 160, 0.18);
}

.login-panel form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.login-field {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 0.35rem;
}

.login-field label {
    font-weight: 600;
    color: #2f2a52;
}

.login-panel .form-actions {
    margin-top: 0.8rem;
}

.login-panel input {
    border: 1px solid var(--ev-border);
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-size: 1rem;
    text-transform: none;
}

.login-icon span {
    font-size: 3rem;
}

.subtitle {
    color: var(--ev-muted);
    margin: 0.2rem 0 1rem;
}

.error-box {
    background: #ffe1e1;
    color: #b42318;
    padding: 0.7rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.error {
    color: #b42318;
    font-size: 0.8rem;
}

/* Lead form */
.lead-form-card {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.8rem clamp(1.5rem, 3vw, 3.6rem);
    box-sizing: border-box;
    border-radius: 38px;
    border: 1px solid rgba(116, 72, 255, 0.15);
    background: radial-gradient(120% 140% at 0% 0%, #ffffff 0%, #f5f1ff 55%, #ede6ff 100%);
    box-shadow: 0 55px 110px rgba(22, 5, 63, 0.18);
}

.lead-form-header {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .lead-form-header {
        flex-direction: column;
        text-align: center;
    }

    .lead-form-meta {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .lead-form-card {
        padding: 1.8rem 1.25rem;
        border-radius: 28px;
    }
}

.lead-chip {
    display: inline-block;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    background: var(--ev-secondary);
    color: var(--ev-primary);
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.lead-form-meta {
    text-align: right;
    color: var(--ev-muted);
}

.lead-form-meta strong {
    display: block;
    font-size: 2rem;
    color: var(--ev-primary);
}

.lead-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    column-gap: 40px;
    row-gap: 32px;
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 1080px) {
    .lead-form-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
        column-gap: 32px;
        row-gap: 28px;
    }
}

@media (max-width: 720px) {
    .lead-form-grid {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
        row-gap: 26px;
    }
}

.lead-field input,
.lead-field select,
.lead-field textarea {
    position: relative;
    z-index: 1;
}

.lead-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
    color: #4b4862;
    width: 100%;
}

.lead-field > span {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a739a;
}

.lead-field input,
.lead-field select,
.lead-field textarea {
    border: 1px solid var(--lead-input-border);
    border-radius: var(--lead-input-radius);
    width: 100%;
    box-sizing: border-box;
    padding: 0 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--lead-input-bg);
    min-height: var(--lead-input-height);
    line-height: 1.35;
    color: #1f1a39;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), var(--lead-input-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.lead-field input::placeholder,
.lead-field textarea::placeholder,
.lead-field select::placeholder {
    color: #a3a7c2;
}

.lead-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 5.5L11 1.5' stroke='%236a5fb2' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.5rem;
}

.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
    outline: none;
    border-color: #8c7bff;
    box-shadow: 0 14px 32px rgba(102, 77, 191, 0.2);
    transform: translateY(-1px);
}

.linha-campos {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.lead-seller-producer-row {
    grid-column: span 2;
}

.campo {
    flex: 2;
}

.campo-empresa {
    flex: 1.35;
}

.campo-checkbox {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: flex-end;
    min-height: var(--lead-input-height);
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: var(--lead-input-height);
    padding: 0 0.85rem;
    border: 1px solid var(--lead-input-border);
    border-radius: var(--lead-input-radius);
    background: #fff;
    box-shadow: var(--lead-input-shadow);
    color: #3e3b57;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    accent-color: var(--ev-primary);
    box-shadow: none;
}

.campo-checkbox.is-disabled .checkbox-inline {
    color: #8a849f;
    background: #f8f7fc;
    cursor: not-allowed;
}

.campo-checkbox.is-disabled .checkbox-inline input[type="checkbox"] {
    cursor: not-allowed;
}

@media (max-width: 1080px) {
    .lead-seller-producer-row {
        grid-column: 1 / -1;
    }
}

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

    .campo-checkbox {
        min-height: auto;
    }

    .checkbox-inline {
        justify-content: flex-start;
        width: 100%;
        box-sizing: border-box;
    }
}

.lead-field.block {
    grid-column: 1 / -1;
}

.lead-field textarea {
    resize: vertical;
    padding: 0.7rem 0.85rem;
    min-height: 120px;
}

.lead-grid-full {
    grid-column: 1 / -1;
    max-width: 1020px;
    width: 100%;
    margin: 0 auto;
}

.dependent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ev-primary);
    margin-top: 0.5rem;
}

.dependent-header strong {
    font-size: 1rem;
}

.dependent-header small {
    display: block;
    color: var(--ev-muted);
}

.dependent-grid {
    border-radius: 30px;
    border: 1px solid rgba(118, 90, 255, 0.18);
    background: linear-gradient(135deg, #faf7ff 0%, #f2ecff 50%, #ebe4ff 100%);
    padding: 1.8rem 2rem;
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    box-shadow: 0 35px 70px rgba(58, 30, 124, 0.12);
}

.dependent-grid.compact {
    background: #ffffff;
    border: 1px solid rgba(116, 72, 255, 0.12);
    border-radius: 24px;
    padding: 1.25rem 1.45rem;
}

.dependent-row {
    border: 1px solid rgba(122, 96, 224, 0.15);
    border-radius: 22px;
    background: #ffffff;
    padding: 1.25rem 1.45rem 1.3rem;
    box-shadow: 0 22px 48px rgba(46, 27, 102, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.dependent-line {
    display: grid;
    gap: 20px;
    align-items: flex-end;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.dependent-line-primary {
    grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) minmax(360px, 3fr) minmax(170px, 1.35fr) 48px;
    align-items: end;
}

.dependent-line-secondary {
    grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(240px, 2fr) minmax(130px, 1fr);
    gap: 20px;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(218, 205, 255, 0.7);
}

@media (max-width: 1200px) {
    .dependent-line-primary,
    .dependent-line-secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dependent-row input,
.dependent-row select {
    border: 1px solid var(--lead-input-border);
    border-radius: 13px;
    padding: 0 0.95rem;
    min-height: 42px;
    height: 42px;
    font-size: 0.95rem;
    font-weight: 500;
    background: #fefefe;
    color: #1f1a39;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6), var(--lead-input-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.dependent-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 5.5L11 1.5' stroke='%236a5fb2' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.4rem;
}

.dependent-row input::placeholder,
.dependent-row select::placeholder {
    color: #a0a8c0;
}

.dependent-row input[type="date"] {
    text-transform: none;
    font-family: inherit;
    text-align: center;
    padding-right: 0.85rem;
}

.dependent-row input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    opacity: 0.75;
}

.dependent-row input:focus,
.dependent-row select:focus {
    outline: none;
    border-color: #8875ff;
    box-shadow: 0 14px 32px rgba(102, 77, 191, 0.2);
    transform: translateY(-1px);
    background: #fff;
}

.dependent-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.dependent-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #7b749e;
    letter-spacing: 0.05em;
    line-height: 1;
    margin: 0 0 0.08rem;
    text-transform: uppercase;
}

.commission-field input,
.currency-input {
    text-align: right;
}

.vigencia-field input[type="date"] {
    text-align: center;
}

.commission-field,
.objective-field,
.commission-select-field,
.vigencia-field,
.seller-field {
    max-width: none;
    width: 100%;
}

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

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

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

.beneficiary-field input {
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 1rem;
}

.cpf-field {
    grid-column: auto;
    width: 17ch;
    max-width: 100%;
    justify-self: start;
    margin: 0;
}

.cpf-field input {
    width: 100%;
}

.grau-field {
    grid-column: auto;
    width: 21ch;
    max-width: 100%;
    min-width: 0;
    justify-self: start;
    margin: 0;
}

.grau-field select {
    width: 100%;
}

.objective-field {
    grid-column: auto;
    justify-self: start;
}

.premio-field.premio-net-field,
.premio-field.premio-table-field {
    grid-column: auto;
    width: 13ch;
    max-width: 100%;
    justify-self: start;
    align-items: flex-start;
    margin: 0;
}

.premio-field.premio-net-field input,
.premio-field.premio-table-field input {
    width: 100%;
}

.premio-net-field--placeholder {
    visibility: hidden;
    pointer-events: none;
}

.commission-select-field {
    grid-column: auto;
    width: 11ch;
    max-width: 100%;
    justify-self: start;
    align-items: flex-start;
}

.commission-select-field input[data-beneficiary-commission-display] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding-inline: 0.75rem;
}

.commission-select-field select {
    width: 100%;
}

.action-field {
    grid-column: auto;
    width: 38px;
    height: 38px;
    justify-self: auto;
    align-self: end;
    padding-left: 0;
    margin: 0;
}

.action-field label {
    display: none;
}

.action-field button,
.beneficiary-remove-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 146, 182, 0.4);
    background: radial-gradient(circle at 35% 35%, #ffe5ee 0%, #ffcbdc 65%, #ffb3c9 100%);
    color: #c6374f;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 28px rgba(198, 55, 79, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-field button:hover,
.beneficiary-remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px rgba(198, 55, 79, 0.3);
}

@media (max-width: 1200px) {
    .matricula-field,
    .empresa-field,
    .beneficiary-field,
    .cpf-field,
    .grau-field,
    .objective-field,
    .premio-field.premio-net-field,
    .premio-field.premio-table-field,
    .commission-select-field,
    .action-field {
        grid-column: auto;
    }

    .action-field {
        justify-self: end;
    }
}

@media (max-width: 720px) {
    .dependent-line-primary,
    .dependent-line-secondary {
        grid-template-columns: 1fr;
    }

    .matricula-field,
    .empresa-field,
    .beneficiary-field,
    .cpf-field,
    .grau-field,
    .objective-field,
    .premio-field.premio-net-field,
    .premio-field.premio-table-field,
    .commission-select-field,
    .action-field {
        grid-column: 1;
        justify-self: stretch;
    }

    .action-field {
        justify-self: end;
    }
}

.dependent-row.head {
    font-weight: 600;
    color: var(--ev-muted);
    background: #f1edff;
}

.beneficiary-add-btn {
    align-self: flex-start;
    margin-top: 0.8rem;
    margin-left: 0.2rem;
    border: 1px dashed rgba(116, 72, 255, 0.6);
    border-radius: 16px;
    padding: 0.75rem 1.65rem;
    background: #ffffff;
    color: var(--ev-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 16px 32px rgba(72, 28, 143, 0.12);
}

.beneficiary-add-btn:hover {
    background: var(--ev-secondary);
    border-color: var(--ev-primary);
}


.lead-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.2rem;
}

.lead-outline-btn {
    border-radius: 999px;
    padding: 0.7rem 1.8rem;
    border: 1px solid var(--ev-primary);
    color: var(--ev-primary);
    text-decoration: none;
    font-weight: 600;
}

.lead-outline-btn:hover {
    background: var(--ev-secondary);
}

.lead-solid-btn {
    border: none;
    border-radius: 999px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #7448ff, #9c5bff);
    color: #fff;
    box-shadow: 0 15px 30px rgba(116, 72, 255, 0.35);
    cursor: pointer;
}

/* Modal e formulário de vendedores */
.ev-modal {
    border: none;
    border-radius: 28px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #f0ebff;
    width: min(620px, 94vw);
    max-width: 620px;
    max-height: 90vh;
    overflow: auto;
    overflow-x: hidden;
    box-shadow: 0 35px 80px rgba(8, 4, 31, 0.22);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.ev-modal.ev-modal-wide {
    width: min(860px, 96vw);
    max-width: 860px;
}

.ev-modal::backdrop {
    background: rgba(12, 8, 28, 0.45);
    backdrop-filter: blur(4px);
}

.modal-card {
    padding: 1.75rem 1.8rem;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    gap: 1.2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #1d1440;
    font-weight: 600;
}

.modal-header p {
    margin: 0;
    color: #86809f;
    font-size: 0.95rem;
}

.modal-close {
    border: none;
    background: #f3f0ff;
    color: var(--ev-primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
}

.modal-actions--center {
    justify-content: center;
}

.modal-actions--center .ev-button {
    min-width: 120px;
}

.modal-actions.equal {
    justify-content: space-between;
}

.modal-actions.equal .ev-button {
    flex: 1;
    justify-content: center;
}

.ev-modal.supervisor-edit-modal {
    width: min(1040px, 96vw);
    max-width: 1040px;
}

.ev-modal.supervisor-edit-modal .modal-card {
    padding: 2rem;
}

.ev-modal.supervisor-edit-modal .modal-body.entity-edit-form {
    gap: 1.5rem;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(160px, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
    width: 100% !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot,
.ev-modal.supervisor-edit-modal .supervisor-edit-grid .seller-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    justify-self: stretch !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot:nth-child(1) {
    grid-column: 1 !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot:nth-child(2) {
    grid-column: 2 !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot:nth-child(3) {
    grid-column: 3 !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid label {
    margin: 0 !important;
    text-align: left !important;
    line-height: 1.2 !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-grid .ev-input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 14px !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-actions {
    justify-content: flex-end !important;
    gap: 16px !important;
    margin-top: 0.25rem;
}

.ev-modal.supervisor-edit-modal .supervisor-edit-actions .ev-button {
    min-width: 150px;
    height: 48px;
    justify-content: center;
}

@media (max-width: 760px) {
    .ev-modal.supervisor-edit-modal .supervisor-edit-grid {
        grid-template-columns: 1fr !important;
    }

    .ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot:nth-child(1),
    .ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot:nth-child(2),
    .ev-modal.supervisor-edit-modal .supervisor-edit-grid > .supervisor-edit-slot:nth-child(3) {
        grid-column: 1 !important;
    }

    .ev-modal.supervisor-edit-modal .supervisor-edit-actions {
        flex-direction: column;
    }

    .ev-modal.supervisor-edit-modal .supervisor-edit-actions .ev-button {
        width: 100%;
    }
}

.form-grid.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    column-gap: 0.6rem;
    row-gap: 0.35rem;
}

.user-form-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.user-form-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 18px;
}

.user-form-row + .user-form-row {
    padding-top: 8px;
    border-top: 1px solid rgba(93, 90, 153, 0.18);
}

@media (max-width: 960px) {
    .user-form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.user-form-grid .field-block {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.user-form-grid .form-field {
    gap: 6px;
}

.user-form-grid .form-field > span:first-child {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7e7a9e;
}

.user-form-grid .ev-input {
    min-height: 44px;
    border-radius: 24px;
    padding: 0.55rem 0.95rem;
}

.user-form-grid .checkbox-stack {
    min-height: 100%;
    text-align: center;
    align-items: center;
}

.user-form-grid .checkbox-stack__control {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--ev-border);
    border-radius: 24px;
    min-height: 44px;
    padding: 0.2rem 0.45rem;
    width: 100%;
}

.user-form-grid .checkbox-stack input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
}

.user-form-grid .action-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: 6px;
}

.user-form-grid .action-block__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7e7a9e;
}

.user-form-grid .action-block button {
    width: 100%;
    min-height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.seller-form .ev-input {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 30px;
    padding: 4px 10px;
    font-size: 0.78rem;
    border-radius: 8px;
    border: 1px solid rgba(122, 111, 183, 0.28);
    background: #fbfaff;
    box-sizing: border-box;
    transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}

.seller-form .ev-input:focus {
    border-color: var(--ev-primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(116, 72, 255, 0.2);
}

.seller-simple {
    padding: 0.25rem 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.seller-simple__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    column-gap: 0.75rem;
    row-gap: 0.75rem;
    justify-content: flex-start;
    width: 100%;
}

@media (max-width: 720px) {
    .seller-simple__grid {
        grid-template-columns: 1fr;
    }
}

.seller-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    max-width: none;
    justify-self: stretch;
}

.seller-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5f5978;
}

.seller-field--with-toggle .seller-field__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.seller-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: #7a8098;
    font-weight: 600;
}

.seller-inline-toggle input[type="checkbox"] {
    margin: 0;
}

.seller-field .required {
    color: #d12d52;
    margin-left: 0.2rem;
}

.seller-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #6b7286;
    border: 1px solid #cdd2e2;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.seller-field input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(107, 114, 134, 0.35);
    outline-offset: 2px;
}

.form-field label {
    font-size: 0.85rem;
    color: var(--ev-muted);
    font-weight: 600;
}

.form-field .required {
    color: #d12d52;
    margin-left: 0.2rem;
}

.ev-input {
    width: 100%;
    border: 1px solid var(--lead-input-border);
    border-radius: var(--lead-input-radius);
    padding: 0 0.85rem;
    min-height: var(--lead-input-height);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--lead-input-bg);
    color: #1f1a39;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5), var(--lead-input-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.ev-input::placeholder {
    color: #a3a7c2;
}

select.ev-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 5.5L11 1.5' stroke='%236a5fb2' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.4rem;
}

textarea.ev-input {
    padding: 0.7rem 0.85rem;
    min-height: 120px;
}

.ev-input:focus {
    outline: none;
    border-color: #8c7bff;
    box-shadow: 0 14px 32px rgba(102, 77, 191, 0.2);
    transform: translateY(-1px);
}

.ev-select {
    width: 100%;
    border: 1px solid var(--lead-input-border);
    border-radius: var(--lead-input-radius);
    min-height: var(--lead-input-height);
    padding: 0 2.4rem 0 0.85rem;
    font-size: 0.9rem;
    background: var(--lead-input-bg)
        url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 5.5L11 1.5' stroke='%236a5fb2' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
        no-repeat right 0.85rem center;
    box-shadow: var(--lead-input-shadow);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #1f1a39;
}

.ev-select:focus {
    outline: none;
    border-color: #8c7bff;
    box-shadow: 0 14px 32px rgba(102, 77, 191, 0.2);
}

.field-hint {
    color: #918bb6;
    font-size: 0.78rem;
}

.field-error {
    color: #d12d52;
    font-size: 0.82rem;
    font-weight: 600;
}

.is-hidden {
    display: none !important;
}

.form-alert {
    background: #ffe1e1;
    color: #a8072c;
    border-radius: 16px;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
}

.form-alert--success {
    background: #e4fbef;
    color: #0c6b32;
}

.form-alert--error {
    background: #ffe1e1;
    color: #a8072c;
}


.access-control {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.access-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.access-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.access-actions .ev-button.small {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
}

.access-section {
    border: 1px solid rgba(20, 0, 70, 0.08);
    border-radius: 22px;
    padding: 1.5rem;
    background: #ffffff !important;
    box-shadow: 0 18px 40px rgba(20, 0, 70, 0.08);
}

.permission-table {
    width: 100%;
    border-spacing: 0 0.4rem;
}

.permission-table th {
    text-align: left;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(21, 25, 44, 0.5);
}

.permission-table td {
    background: #f3f2ff;
    padding: 0.65rem 0.8rem;
    border-radius: 16px;
    font-size: 0.92rem;
}

.card-meta {
    display: block;
    font-size: 0.75rem;
    color: rgba(21, 25, 44, 0.65);
    margin-top: 0.2rem;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.permission-chip.allowed {
    background: rgba(43, 196, 153, 0.2);
    color: #198f70;
}

.permission-chip.blocked {
    background: rgba(147, 153, 183, 0.25);
    color: rgba(21, 25, 44, 0.65);
}


.weekly-results-card {
    margin-top: 2rem;
}

.weekly-results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.weekly-row {
    border: 1px solid rgba(20, 0, 70, 0.08);
    border-radius: 20px;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: #fff;
}

.weekly-row ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.weekly-row li {
    display: flex;
    flex-direction: column;
    background: #f6f4ff;
    border-radius: 14px;
    padding: 0.6rem 0.8rem;
}

.weekly-row span {
    font-size: 0.75rem;
    color: var(--ev-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.weekly-row strong {
    font-size: 1rem;
    color: #1f1a35;
}

.skeleton-row {
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(162, 148, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}
.skeleton-bar {
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(162, 148, 255, 0.5), rgba(255, 255, 255, 0));
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}
.skeleton-bar--title {
    height: 20px;
    width: 55%;
    margin-bottom: 0.4rem;
}
.skeleton-bar--search {
    height: 44px;
    border-radius: 14px;
    width: 100%;
    margin-bottom: 0.75rem;
}
.skeleton-bar--btn {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 0.45rem;
}
.skeleton-bar--full {
    width: 100%;
    margin-bottom: 0.35rem;
}
.skeleton-bar--half {
    width: 70%;
}
.skeleton-pill,
.skeleton-badge {
    display: inline-block;
    height: 26px;
    border-radius: 999px;
    width: 120px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(162, 148, 255, 0.5), rgba(255, 255, 255, 0));
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}
.skeleton-badge {
    width: 90px;
    height: 20px;
}
.skeleton-badge--wide {
    width: 150px;
}
.access-panel--placeholder .ev-button.primary {
    opacity: 0.8;
    cursor: wait;
}
.access-placeholder-card {
    border: 1px dashed #dcd5ff;
    border-radius: 22px;
    padding: 1.25rem 1.5rem;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(114, 91, 255, 0.08);
}
.placeholder-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.placeholder-permission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.placeholder-permission-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.placeholder-permission-list .skeleton-bar--full:last-child,
.placeholder-list .skeleton-row:last-child {
    margin-bottom: 0;
}
.placeholder-permission-list {
    display: flex;
    flex-direction: column;
}
.tiny-text {
    font-size: 0.8rem;
}
.access-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.access-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #ffffff, #f6f2ff);
    border: 1px solid #ece7ff;
    border-radius: 24px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 18px 40px rgba(43, 9, 109, 0.08);
}

.access-panel-header h2 {
    margin: 0.15rem 0 0.35rem;
    font-size: 1.75rem;
    font-weight: 600;
    color: #342a63;
}

.access-panel-header .muted {
    color: #78759a;
}

.access-panel-header .eyebrow {
    color: #a49fc3;
    letter-spacing: 0.26em;
}

.access-panel-header .ev-button.primary {
    box-shadow: 0 12px 25px rgba(72, 42, 199, 0.25);
}

  .access-grid {
      display: grid;
      grid-template-columns: minmax(300px, 360px) 1fr;
      gap: 1.5rem;
      align-items: start;
  }

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

.access-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

  .users-search input {
      width: 100%;
      border: 1px solid #d9dce3;
      border-radius: 14px;
      padding: 0.65rem 1rem;
      font: inherit;
      background: #f8f8fc;
  }
  
  .users-search {
      margin-bottom: 0.85rem;
  }
  
  .users-list {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      max-height: 68vh;
      overflow-y: auto;
      padding-right: 0.35rem;
  }
  
  .users-list::-webkit-scrollbar {
      width: 6px;
  }
  
  .users-list::-webkit-scrollbar-thumb {
      background: rgba(124, 93, 250, 0.4);
      border-radius: 999px;
  }
  
  .user-card {
      border: 1px solid #cfd4ff;
      border-radius: 16px;
      padding: 0.9rem 1rem;
      margin: 8px;
      cursor: pointer;
      transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
      background: #ffffff;
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
  }
  
  .user-card.is-active {
      border-color: #7b61ff;
      box-shadow: 0 4px 16px rgba(123, 97, 255, 0.18);
      transform: translateY(-1px);
  }
  
  .user-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.65rem;
  }

  .user-card-tools {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      flex-shrink: 0;
  }
  
  .user-card-title {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
  }
  
  .user-name {
      margin: 0;
      font-size: 1.05rem;
      font-weight: 600;
      color: #141623;
  }
  
  .user-card-details {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      padding-top: 0;
  }

  .access-edit-inline {
      border: none;
      background: #f3f4f6;
      width: 28px;
      height: 28px;
      border-radius: 8px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      color: #374151;
      font-size: 14px;
      line-height: 1;
      transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .access-edit-inline:hover {
      background: #e5e7eb;
      color: #111827;
      transform: translateY(-1px);
  }
  
  .user-detail {
      margin: 0;
      display: flex;
      gap: 0.4rem;
      font-size: 0.9rem;
      color: #51566c;
      line-height: 1.3;
  }
  
  .detail-label {
      font-weight: 600;
      color: #7b80a0;
  }
  
  .detail-value {
      font-weight: 600;
      color: #1f2433;
  }
  
  .user-login-pill {
      font-size: 0.78rem;
      color: #5e6380;
      background: #eef1ff;
      border-radius: 999px;
      padding: 0.05rem 0.55rem;
      width: fit-content;
  }
  
  .status-chip,
  .role-chip {
      display: inline-flex;
      align-items: center;
      padding: 0.15rem 0.6rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 600;
  }
  
  .status-chip.is-active {
      background: #dcf5ea;
      color: #1f9a5f;
  }
  
  .status-chip.is-inactive {
      background: #fce8e6;
      color: #d93025;
  }
  
  .ghost-button {
      border: none;
      background: transparent;
      color: #6b7280;
      font-weight: 600;
      cursor: pointer;
      padding: 0.1rem 0.2rem;
  }
  
  .ghost-button:disabled {
      color: #c2c6d6;
      cursor: not-allowed;
  }
  
  .user-card-footer,
  .user-card-actions {
      display: none;
  }
  
  @media (max-width: 768px) {
  .user-card-header {
          flex-direction: column;
          align-items: flex-start;
      }
  
      .user-detail {
          flex-direction: column;
          gap: 0.15rem;
      }
  }

  .user-summary {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      flex-wrap: wrap;
      gap: 1rem;
      border-bottom: 1px solid #eef0f6;
      padding-bottom: 1rem;
      margin-bottom: 1.25rem;
  }
  
  .user-summary-text h3 {
      margin: 0.1rem 0;
      font-size: 1.35rem;
  }
  
  .user-summary-meta {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      font-size: 0.95rem;
      color: #5c637a;
  }
  
  .user-summary-meta p {
      margin: 0;
  }
  
  .user-summary-meta strong {
      color: #1d2030;
  }
  
  .user-summary-badges {
      display: inline-flex;
      gap: 0.5rem;
      flex-wrap: wrap;
  }
  
  .user-action-bar {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-bottom: 1rem;
  }
  
  .user-action-bar .ev-button {
      min-width: 140px;
  }
  
  .permission-modules {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      max-height: 58vh;
      overflow-y: auto;
      padding-right: 0.35rem;
  }
  
  .permission-modules::-webkit-scrollbar {
      width: 6px;
  }
  
  .permission-modules::-webkit-scrollbar-thumb {
      background: rgba(34, 41, 70, 0.15);
      border-radius: 999px;
  }
  
  .permission-module-card {
      border: 1px solid #e5e8f4;
      border-radius: 18px;
      padding: 1.1rem 1.35rem;
      background: #ffffff;
      display: flex;
      flex-direction: column;
      gap: 0.85rem;
      box-shadow: 0 8px 24px rgba(20, 24, 52, 0.1);
  }
  
  .permission-module-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;
      flex-wrap: wrap;
  }
  
  .permission-module-header h4 {
      margin: 0.15rem 0 0;
      font-size: 1.05rem;
  }
  
  .permission-count {
      display: inline-flex;
      align-items: center;
      padding: 0.25rem 0.85rem;
      border-radius: 999px;
      background: rgba(124, 93, 250, 0.12);
      color: #5a3ed5;
      font-size: 0.8rem;
      font-weight: 600;
  }
  
  .permission-toggles {
      display: flex;
      flex-direction: column;
      gap: 1rem;
  }
  
  .permission-toggle {
      display: grid;
      grid-template-columns: 34px 1fr;
      gap: 0.85rem;
      align-items: center;
  }
  
  .permission-toggle input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: #7c5dfa;
  }
  
  .permission-toggle-copy strong {
      display: block;
      font-size: 0.95rem;
      color: #1c1d21;
  }
  
  .permission-toggle-copy p {
      margin: 0.15rem 0 0;
      color: #6b7280;
      font-size: 0.85rem;
  }
  
  .permission-toggle.is-danger {
      border-radius: 12px;
      padding: 0.35rem 0.4rem;
      background: rgba(217, 48, 37, 0.04);
      border: 1px solid rgba(217, 48, 37, 0.2);
  }

  .user-overrides-layout {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      max-height: 58vh;
      overflow-y: auto;
      padding-right: 0.35rem;
  }

  .user-overrides-layout::-webkit-scrollbar {
      width: 6px;
  }

  .user-overrides-layout::-webkit-scrollbar-thumb {
      background: rgba(34, 41, 70, 0.15);
      border-radius: 999px;
  }

  .user-override-card {
      gap: 1rem;
  }
  
  .permission-risk-label {
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      font-size: 0.78rem;
      color: #b42318;
      font-weight: 600;
      margin-top: 0.35rem;
  }
  
  .permission-menu-note {
      display: inline-flex;
      align-items: center;
      font-size: 0.78rem;
      color: #4b5563;
      font-weight: 600;
      margin-top: 0.35rem;
  }
  
  .home-hero {
      min-height: calc(100vh - 160px);
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
  }
  
  .home-hero__content {
      max-width: 640px;
      padding: 3rem 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 1rem;
  }
  
  .home-hero__content h1 {
      font-size: 2.4rem;
      font-weight: 700;
      color: #111827;
      margin: 0;
  }
  
  .home-hero__content h2 {
      font-size: 1.2rem;
      font-weight: 500;
      color: #6b7280;
      margin: 0;
  }
  
  .home-hero__eyebrow {
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-size: 0.78rem;
      color: #9ca3af;
      margin: 0;
  }
  
  .home-hero__content p {
      margin: 0;
      color: #4b5563;
      font-size: 1rem;
  }
  
  .permissions-toolbar {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1rem;
  }
  
  .bulk-buttons {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
  }
  
  .bulk-buttons .ev-button {
      padding-inline: 0.9rem;
  }
  
  .permission-search input {
      border: 1px solid #dcdfe8;
      border-radius: 999px;
      padding: 0.45rem 0.95rem;
      min-width: 220px;
      font: inherit;
  }
  
  .role-selector {
      border: 1px solid #e5e8f4;
      border-radius: 16px;
      padding: 0.85rem 1rem;
      background: #f9f9ff;
      margin-bottom: 1rem;
  }
  
  .role-selector-title {
      margin: 0 0 0.35rem;
      font-size: 0.9rem;
      color: #5f6380;
  }
  
  .role-selector-options {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 0.5rem;
  }
  
  .role-selector-hint {
      margin: 0.65rem 0 0;
      font-size: 0.78rem;
      color: #7a809b;
  }

  .linked-profile-card {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      border: 1px solid #dde6f5;
      border-radius: 14px;
      background: #ffffff;
      padding: 0.8rem 0.9rem;
  }

  .linked-profile-card strong,
  .linked-profile-card small {
      display: block;
  }

  .linked-profile-card small {
      color: #7a809b;
      font-size: 0.76rem;
      margin-top: 0.18rem;
  }
  
  .role-option {
      border: 1px solid #dfe2f1;
      border-radius: 12px;
      padding: 0.5rem 0.75rem;
      display: flex;
      gap: 0.5rem;
      cursor: pointer;
  }
  
  .role-option.is-active {
      border-color: #7c5dfa;
      box-shadow: 0 0 0 2px rgba(124, 93, 250, 0.15);
  }
  
  .role-option input {
      margin-top: 0.25rem;
  }
  
  .role-option small {
      display: block;
      color: #7a809b;
      font-size: 0.72rem;
  }
  
.permission-footer {
      position: sticky;
      bottom: 0;
      display: flex;
      justify-content: flex-end;
      gap: 0.85rem;
      flex-wrap: wrap;
      border-top: 1px solid #e0e4f2;
      padding: 1rem 0 0;
      margin-top: 1.25rem;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 60%);
  }

.access-panel--rbac {
    gap: 1.25rem;
}

.access-panel-header--rbac {
    align-items: center;
}

.access-panel-header__stats {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.mini-stat {
    min-width: 120px;
    padding: 0.95rem 1rem;
    border: 1px solid #e6ecf4;
    border-radius: 18px;
    background: linear-gradient(160deg, #ffffff 0%, #f5f8ff 100%);
    box-shadow: 0 12px 30px rgba(23, 31, 56, 0.08);
}

.mini-stat strong,
.mini-stat span {
    display: block;
}

.mini-stat strong {
    font-size: 1.35rem;
    color: #1a2238;
}

.mini-stat span {
    margin-top: 0.2rem;
    color: #61708f;
    font-size: 0.82rem;
}

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

.access-tab {
    border: 1px solid #dfe6f4;
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfcff 0%, #eef4ff 100%);
    padding: 1rem 1.1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.access-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(28, 44, 80, 0.08);
}

.access-tab.is-active {
    border-color: #2f6fed;
    background: linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
    box-shadow: 0 18px 34px rgba(47, 111, 237, 0.14);
}

.access-tab__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7b8aa8;
    font-weight: 700;
}

.access-tab__title {
    color: #16213d;
    font-size: 1.05rem;
}

.access-page-grid {
    display: grid;
    gap: 1rem;
}

.access-page-grid--roles,
.access-page-grid--permissions {
    grid-template-columns: minmax(0, 1fr);
}

.rbac-panel-card {
    border: 1px solid #e2e8f4;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: 0 18px 42px rgba(20, 29, 58, 0.08);
    padding: 1.2rem 1.25rem;
}

.rbac-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rbac-card-header h3 {
    margin: 0.15rem 0 0;
    color: #17233f;
}

.rbac-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 220px;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.rbac-search,
.rbac-filter {
    width: 100%;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.78rem 0.95rem;
    font: inherit;
    color: #1f2b46;
}

.rbac-table-shell,
.matrix-shell {
    overflow-x: auto;
}

.rbac-table,
.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.rbac-table th,
.rbac-table td,
.matrix-table th,
.matrix-table td {
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid #edf1f8;
    vertical-align: middle;
    text-align: left;
}

.rbac-table th,
.matrix-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c88a0;
}

.rbac-table tbody tr {
    cursor: pointer;
    transition: background 0.18s ease;
}

.rbac-table tbody tr:hover {
    background: rgba(47, 111, 237, 0.04);
}

.rbac-table tbody tr.is-selected {
    background: rgba(47, 111, 237, 0.08);
}

.cell-title,
.cell-subtitle {
    display: block;
}

.cell-title {
    color: #16213d;
}

.cell-subtitle {
    margin-top: 0.18rem;
    color: #6a7691;
    font-size: 0.82rem;
}

.table-action {
    border: 1px solid #d5deec;
    background: #fff;
    color: #1d376e;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    margin-right: 0.45rem;
    cursor: pointer;
}

.table-action:hover {
    border-color: #2f6fed;
}

.role-badge,
.scope-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.32rem 0.72rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.role-badge--admin {
    background: rgba(209, 36, 66, 0.12);
    color: #aa1437;
}

.role-badge--supervisor {
    background: rgba(47, 111, 237, 0.12);
    color: #1754c0;
}

.role-badge--seller {
    background: rgba(21, 140, 84, 0.12);
    color: #0f7b47;
}

.scope-badge--me {
    background: rgba(90, 102, 125, 0.12);
    color: #4f5c73;
}

.scope-badge--team {
    background: rgba(38, 132, 255, 0.12);
    color: #1564c0;
}

.scope-badge--all {
    background: rgba(255, 153, 31, 0.14);
    color: #b06400;
}

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

.summary-item {
    border: 1px solid #e5ebf5;
    border-radius: 18px;
    background: #fff;
    padding: 0.85rem 0.95rem;
}

.summary-item__label {
    display: block;
    color: #76839a;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.role-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.role-card {
    border: 1px solid #dde5f3;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.role-card.is-active {
    border-color: #2f6fed;
    box-shadow: 0 14px 30px rgba(47, 111, 237, 0.12);
}

.profile-editor-list {
    display: grid;
    gap: 1rem;
}

.profile-editor-card {
    border: 1px solid #dce5f3;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    overflow: hidden;
}

.profile-editor-card.is-open {
    box-shadow: 0 18px 34px rgba(31, 52, 94, 0.1);
}

.profile-editor-card__header {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
}

.profile-editor-card__copy {
    display: grid;
    gap: 0.35rem;
}

.profile-editor-card__copy strong {
    color: #17233f;
    font-size: 1.05rem;
}

.profile-editor-card__copy p {
    margin: 0;
    color: #6a7691;
}

.profile-editor-card__meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.profile-editor-card__caret {
    color: #5d6a86;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.18s ease;
}

.profile-editor-card__caret.is-open {
    transform: rotate(180deg);
}

.profile-editor-card__body {
    border-top: 1px solid #e7eef8;
    padding: 0 1.1rem 1.1rem;
}

.profile-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 0;
}

.profile-editor-dirty {
    color: #9a5a00;
    font-size: 0.82rem;
    font-weight: 700;
}

.profile-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.9rem;
}

.profile-category-card {
    border: 1px solid #e4ebf7;
    border-radius: 18px;
    background: #fff;
    padding: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.profile-category-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.profile-category-card__header h4,
.profile-category-card__header p {
    margin: 0;
}

.profile-category-card__header p {
    color: #6c7892;
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.profile-category-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.profile-permission-list {
    display: grid;
    gap: 0.6rem;
}

.profile-editor-footer {
    position: sticky;
    bottom: 0;
    margin-top: 1rem;
    padding-top: 0.9rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid #e7eef8;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.5) 0%, #f8fbff 35%);
}

.role-card strong {
    color: #18243e;
}

.role-card p,
.role-card small {
    margin: 0;
    color: #68758e;
}

.role-switcher {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.role-switcher__btn {
    border: 1px solid #d8e2f2;
    border-radius: 999px;
    background: #fff;
    color: #203257;
    padding: 0.52rem 0.9rem;
    cursor: pointer;
    font-weight: 700;
}

.role-switcher__btn.is-active {
    border-color: #2f6fed;
    background: rgba(47, 111, 237, 0.08);
    color: #134ead;
}

@media (max-width: 900px) {
    .profile-editor-card__header,
    .profile-editor-toolbar,
    .profile-category-card__header,
    .profile-editor-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-editor-card__meta {
        justify-content: space-between;
    }

    .profile-editor-footer {
        position: static;
    }
}

.matrix-table td:not(:first-child),
.matrix-table th:not(:first-child) {
    text-align: center;
}

.matrix-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.matrix-toggle input {
    width: 18px;
    height: 18px;
    accent-color: #2f6fed;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 8, 28, 0.32);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 999;
}

.modal-card {
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #1f1a35;
}

.modal-subtitle {
    margin: 0.25rem 0 0;
    color: #827da6;
    font-size: 0.92rem;
}

.modal-step-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.modal-step-tab {
    border: 1px solid #e4def6;
    border-radius: 16px;
    background: #f8f5ff;
    padding: 0.85rem 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.modal-step-tab.is-active {
    border-color: #7351ef;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(93, 60, 199, 0.14);
}

.modal-step-tab__eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b80bd;
}

.modal-step-tab__title {
    font-size: 1rem;
    color: #2a214e;
}

.modal-header .modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: #f1edff;
    color: var(--ev-primary);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.modal-header .modal-close-btn:hover {
    background: #e6deff;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.9rem;
}

.modal-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: #fcfbff;
    border: 1px solid #eee9ff;
    border-radius: 18px;
    padding: 0.7rem 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 12px rgba(64, 33, 118, 0.06);
}

.modal-form .form-field span {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8c88aa;
}

.modal-form .form-field--plain span {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.82rem;
}

.modal-form .form-field input {
    border: none;
    background: transparent;
    font-size: 0.96rem;
    padding: 0.1rem 0 0;
}

.modal-form .form-field select {
    border: none;
    background: transparent;
    font-size: 0.96rem;
    padding: 0.15rem 0 0;
    font-family: inherit;
}

.modal-form .form-field input:focus {
    outline: none;
}

.modal-form .form-field select:focus {
    outline: none;
}

.naturality-field {
    position: relative;
}

.naturality-selected-meta {
    font-size: 0.75rem;
    color: #6d6790;
}

.naturality-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 30;
    background: #ffffff;
    border: 1px solid #dfd8f4;
    border-radius: 16px;
    box-shadow: 0 18px 35px rgba(23, 18, 43, 0.14);
    overflow: hidden;
}

.naturality-dropdown__state {
    margin: 0;
    padding: 0.85rem 1rem;
    font-size: 0.86rem;
    color: #676282;
}

.naturality-dropdown__state.is-error {
    color: #b42318;
}

.naturality-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.naturality-option {
    border: none;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    cursor: pointer;
    text-align: left;
    color: #1f1a35;
    text-transform: uppercase;
}

.naturality-option:hover {
    background: #1297e5;
    color: #ffffff;
}

.naturality-option strong,
.naturality-option__suffix {
    font-size: 0.88rem;
}

.naturality-option__suffix {
    opacity: 0.85;
}

.toggle-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    border: 1px solid #efeaff;
    border-radius: 18px;
    padding: 0.7rem 0.9rem;
    background: #f9f6ff;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid #e5defc;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    background: #ffffff;
    font-weight: 600;
    color: #4c4570;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--ev-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.85rem;
}

.modal-actions .ev-button {
    min-width: 130px;
}

.modal-actions .ev-button.ghost {
    background: transparent;
    border: 1px solid rgba(116, 72, 255, 0.35);
    color: #5d3cc7;
}

.modal-actions .ev-button.primary {
    box-shadow: 0 18px 30px rgba(111, 80, 255, 0.25);
}

@media (max-width: 640px) {
    .modal-card {
        padding: 1.5rem;
    }
    .modal-step-tabs {
        grid-template-columns: 1fr;
    }
    .modal-actions {
        flex-direction: column;
    }
    .modal-actions .ev-button {
        width: 100%;
    }
}

.modal-backdrop .access-user-modal {
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.35rem;
    background: #ffffff;
    border: 1px solid rgba(130, 119, 171, 0.18);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(24, 18, 48, 0.28);
}

.modal-backdrop .access-user-modal--wizard {
    width: min(920px, calc(100vw - 2rem));
}

.modal-backdrop .access-user-modal .modal-header {
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #ece8f6;
}

.modal-backdrop .access-user-modal .modal-close-btn {
    border-radius: 8px;
}

.modal-backdrop .access-user-modal .modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-backdrop .access-user-modal .modal-grid--access-user {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-backdrop .access-user-modal .modal-grid--account {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-actions--wizard {
    margin-top: 0.5rem;
}

.profile-preview-card {
    margin-top: 1rem;
    border: 1px solid #e2e8f4;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 1rem;
}

.profile-preview-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.profile-preview-card__header h4,
.profile-preview-card__header p {
    margin: 0;
}

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

.profile-preview-groups {
    display: grid;
    gap: 0.75rem;
}

.profile-preview-group {
    border: 1px solid #e5ebf6;
    border-radius: 14px;
    padding: 0.85rem;
    background: #fff;
}

.profile-preview-group header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.profile-preview-group header span {
    color: #72809b;
    font-size: 0.78rem;
}

.profile-preview-list {
    display: grid;
    gap: 0.55rem;
}

.profile-preview-item strong,
.profile-preview-item p {
    display: block;
    margin: 0;
}

.profile-preview-item p {
    color: #6f7c96;
    font-size: 0.82rem;
    margin-top: 0.12rem;
}

.modal-backdrop .access-user-modal .toggle-row {
    justify-content: flex-start;
    border-radius: 12px;
}

.modal-backdrop .access-user-modal .checkbox-field {
    border-radius: 8px;
}

@media (max-width: 720px) {
    .modal-backdrop .access-user-modal .modal-grid {
        grid-template-columns: 1fr;
    }
    .modal-backdrop .access-user-modal .modal-grid--access-user,
    .modal-backdrop .access-user-modal .modal-grid--account {
        grid-template-columns: 1fr;
    }
    .profile-preview-card__header,
    .profile-preview-group header {
        flex-direction: column;
        align-items: stretch;
    }
    .profile-preview-grid {
        grid-template-columns: 1fr;
    }
}

.access-feedback {
    background: #ebe6ff;
    color: #4c2fbf;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.access-feedback--error {
    background: #fde8e8;
    color: #b42318;
}
.dependent-field input[data-readonly="true"] {
    background: #f5f5f7;
    cursor: not-allowed;
}


/* Catalog management */
.catalog-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.catalog-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.catalog-tabs button {
    border: 1px solid rgba(116, 72, 255, 0.35);
    background: #fff;
    color: #4b3d74;
    padding: 0.55rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.catalog-tabs button.is-active {
    background: linear-gradient(135deg, #7448ff, #9c5bff);
    color: #fff;
    box-shadow: 0 8px 18px rgba(116, 72, 255, 0.25);
}

.catalog-section {
    display: none;
}

.catalog-section.is-active {
    display: block;
}

.catalog-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 2fr);
    gap: 1.5rem;
}

.catalog-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.catalog-column--wide {
    min-width: 0;
}

.catalog-card {
    background: #fff;
    border: 1px solid #ebe5ff;
    border-radius: 26px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 20px 45px rgba(29, 14, 76, 0.08);
}

.catalog-card--accent {
    border-color: rgba(116, 72, 255, 0.35);
    background: linear-gradient(135deg, #f7f3ff, #fff);
}

.catalog-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.catalog-card__header h3 {
    margin: 0 0 0.2rem;
    font-size: 1.2rem;
    color: #1f1740;
}

.catalog-card__header p {
    margin: 0;
    color: #7a739c;
    font-size: 0.9rem;
}

.catalog-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.catalog-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.9rem 0.85rem;
}

.catalog-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.catalog-field span {
    font-weight: 600;
    color: #4c4668;
    font-size: 0.85rem;
}

.catalog-field input,
.catalog-field select,
.catalog-field textarea {
    border: 1px solid rgba(116, 72, 255, 0.2);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    font-size: 0.92rem;
    font-family: inherit;
    background: #faf9ff;
}

.catalog-field textarea {
    min-height: 90px;
    resize: vertical;
}

.catalog-form__actions {
    display: flex;
    justify-content: flex-end;
}

.catalog-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.catalog-search input[type='text'] {
    border: 1px solid rgba(116, 72, 255, 0.2);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 200px;
}

.catalog-table-wrapper {
    overflow-x: auto;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
}

.catalog-table th {
    text-align: left;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8a84a8;
    padding-bottom: 0.5rem;
}

.catalog-table td {
    padding: 0.65rem 0;
    border-top: 1px solid rgba(103, 87, 139, 0.12);
    vertical-align: top;
}

.catalog-table td strong {
    display: block;
    color: #261c51;
}

.catalog-table td small {
    color: #8e87b2;
    display: block;
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.catalog-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.catalog-actions form {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.catalog-action {
    border: none;
    background: transparent;
    color: var(--ev-primary);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
}

.catalog-action:focus,
.catalog-action:hover {
    color: #4521b3;
}

.catalog-action.danger {
    color: #d3384b;
}

.catalog-actions button.catalog-action {
    background: none;
    border: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-pill.is-active {
    background: rgba(67, 201, 118, 0.15);
    border-color: rgba(67, 201, 118, 0.4);
    color: #128744;
}

.status-pill.is-inactive {
    background: rgba(209, 45, 82, 0.1);
    border-color: rgba(209, 45, 82, 0.3);
    color: #b42445;
}

@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
}

/* Meta x Realizado dashboard */
.meta-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.meta-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-header__intro {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.meta-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
}

.meta-filter-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: flex-start;
}

.meta-filter-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--ev-muted, #6c7480);
    gap: 0.35rem;
    min-width: 120px;
}

@media (max-width: 768px) {
    .meta-filter-form {
        flex-wrap: wrap;
    }
}

.meta-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.meta-tabs {
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid #e5e8ee;
}

.meta-tab {
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: #6c7480;
    cursor: pointer;
    position: relative;
}

.meta-tab.is-active {
    color: var(--ev-primary, #0052cc);
}

.meta-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background: var(--ev-primary, #0052cc);
}

.meta-panels {
    border-radius: 12px;
    background: #f8fbff;
    padding: 1rem;
}

.meta-panel {
    display: none;
    animation: fadeIn 0.2s ease-in-out;
}

.meta-panel.is-active {
    display: block;
}

.meta-panel[data-tab-panel="supervisor"].is-active {
    display: flex;
    justify-content: center;
}

.meta-panel table {
    background: #fff;
    border-radius: 12px;
}

.supervisor-summary-table {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.supervisor-summary-table th.supervisor-commission-cell,
.supervisor-summary-table td.supervisor-commission-cell {
    text-align: center;
}

.supervisor-summary-table th.supervisor-percent-cell,
.supervisor-summary-table td.supervisor-percent-cell {
    text-align: center;
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: #7d8799;
    border: 1px dashed #d9dfeb;
    border-radius: 12px;
    background: #fff;
}

.seller-simple__grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.seller-simple__grid--two {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    column-gap: 1rem;
    row-gap: 1rem;
}

@media (max-width: 640px) {
    .seller-simple__grid--two {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Reduce lead commission input width */
.dependent-field.commission-field.commission-seller-field .percent-input {
    max-width: 140px;
    width: 100%;
    flex: 0 0 auto;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    list-style: none;
}

.user-menu__trigger::-webkit-details-marker {
    display: none;
}

.user-menu__panel--row {
    flex-direction: row;
    min-width: 0;
    white-space: nowrap;
}

.user-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    padding: 0.4rem;
    box-shadow: 0 18px 40px rgba(28, 9, 74, 0.16);
    z-index: 40;
    min-width: 150px;
}

.user-menu__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: #4a4458;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-menu__item:hover {
    background: rgba(109, 53, 245, 0.1);
    color: #4621b4;
}

.user-menu__item i {
    width: 16px;
    height: 16px;
}
