:root {
    --ink: #10233f;
    --ink-soft: #354760;
    --muted: #6c7b90;
    --paper: #f3f6fa;
    --card: #ffffff;
    --line: #dde5ee;
    --navy: #102f4b;
    --navy-deep: #09243b;
    --cyan: #008c99;
    --cyan-dark: #006f7a;
    --cyan-soft: #e2f5f6;
    --green: #147a50;
    --amber: #a45d00;
    --red: #b42318;
    --shadow-sm: 0 8px 24px rgba(16, 47, 75, 0.07);
    --shadow-lg: 0 28px 70px rgba(9, 36, 59, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background-color: #f8f9fb;
    background-image:
        /* Glow ciano no canto superior esquerdo */
        radial-gradient(ellipse at 5% 25%, rgba(0, 195, 200, 0.10) 0%, transparent 50%),
        /* Glow secundário mais suave */
        radial-gradient(ellipse at 15% 60%, rgba(0, 160, 180, 0.05) 0%, transparent 40%),
        /* Arcos concêntricos no canto esquerdo (simulados com repeating) */
        radial-gradient(circle at -5% 35%, transparent 0px, transparent 149px, rgba(0, 195, 200, 0.06) 150px, transparent 151px),
        radial-gradient(circle at -5% 35%, transparent 0px, transparent 249px, rgba(0, 195, 200, 0.05) 250px, transparent 251px),
        radial-gradient(circle at -5% 35%, transparent 0px, transparent 349px, rgba(0, 195, 200, 0.04) 350px, transparent 351px),
        radial-gradient(circle at -5% 35%, transparent 0px, transparent 449px, rgba(0, 195, 200, 0.03) 450px, transparent 451px),
        radial-gradient(circle at -5% 35%, transparent 0px, transparent 549px, rgba(0, 195, 200, 0.02) 550px, transparent 551px);
    background-attachment: fixed;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.45;
}

a {
    color: var(--cyan-dark);
}
button,
input {
    font: inherit;
}
label {
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 780;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    color: #fff;
    background: rgba(9, 36, 59, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.topbar-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-profile-avatar {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.avatar-circle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #08a4ad, #007680);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    box-shadow: 0 4px 14px rgba(0, 140, 153, 0.3);
    transition: transform 0.18s, box-shadow 0.18s;
}
.topbar-profile-avatar:hover .avatar-circle {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 140, 153, 0.4);
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar-app-hidden {
    display: none !important;
}
.nav-update-link {
    position: relative;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    color: #e6f0f4;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 720;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.16s ease, background 0.16s ease;
    white-space: nowrap;
}
.nav-update-link:hover {
    color: #fff;
    background: rgba(0, 140, 153, 0.2);
}
.update-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    border-radius: 50%;
    line-height: 1;
}
.update-badge.pulse {
    animation: badge-pulse 1.5s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 850;
    letter-spacing: -0.02em;
}
.brand-symbol {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, #08a4ad, #007680);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 9px;
    box-shadow: 0 8px 22px rgba(0, 140, 153, 0.25);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}
.brand-logo-img {
    width: auto;
    height: 34px;
    max-width: 180px;
    object-fit: contain;
}
.brand-logo-img-large {
    height: 44px;
    max-width: 230px;
}
.login-logo-img {
    width: auto;
    height: 42px;
    max-width: 190px;
    object-fit: contain;
}
.dashboard-logo-img {
    width: auto;
    height: 52px;
    max-width: 260px;
    display: block;
    margin: 0 0 12px;
    object-fit: contain;
}
.brand small {
    display: block;
    margin-top: 1px;
    color: #a8c4d3;
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav form {
    margin: 0;
}
.nav a,
.nav-logout,
.nav-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    color: #e6f0f4;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 720;
    cursor: pointer;
    text-decoration: none;
    box-shadow: inset 0 0 0 0 rgba(82, 217, 225, 0.18);
    transition:
        color 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease,
        box-shadow 0.16s ease;
}
.nav a:hover,
.nav-action:hover {
    color: #fff;
    background: rgba(0, 164, 176, 0.2);
    border-color: rgba(82, 217, 225, 0.28);
    transform: translateY(-1px);
    box-shadow: inset 0 -2px 0 rgba(82, 217, 225, 0.28), 0 8px 18px rgba(0, 0, 0, 0.12);
}
.nav .nav-home-link {
    color: #082b3d;
    background: linear-gradient(135deg, #e7fbfd, #c9f4f7);
    border-color: rgba(82, 217, 225, 0.58);
    font-weight: 850;
}
.nav .nav-home-link::before {
    content: "↩";
    margin-right: 6px;
    font-size: 0.9rem;
    line-height: 1;
}
.nav .nav-home-link:hover {
    color: #062233;
    background: #fff;
    border-color: rgba(82, 217, 225, 0.9);
}
.button.nav-home-link {
    color: #073047;
    background: linear-gradient(135deg, #e7fbfd, #c9f4f7);
    border-color: rgba(0, 140, 153, 0.28);
    font-weight: 850;
}
.button.nav-home-link::before {
    content: "↩";
    margin-right: 6px;
}
.nav-action.is-active {
    color: #fff;
    background: rgba(0, 164, 176, 0.28);
    border-color: rgba(82, 217, 225, 0.4);
}
.nav-lock-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    display: inline-grid;
    place-items: center;
    color: #bfe5ef;
    flex: 0 0 auto;
}
.nav-lock-icon svg {
    width: 14px;
    height: 14px;
    display: block;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-profile-link {
    display: block;
    padding: 8px 14px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    margin-bottom: 4px;
    transition: background 0.2s;
}
.nav-profile-link:hover {
    background: rgba(255,255,255,0.2);
}
.nav-logout {
    color: #fff;
    background: #b83232;
    border-color: #c94444;
}
.nav-logout:hover {
    color: #fff;
    background: #992727;
    border-color: #b83232;
    transform: translateY(-1px);
}
.nav-logout-red {
    color: #fff;
    background: #dc2626;
    border-color: #ef4444;
    font-weight: 700;
    padding: 0 16px;
    border-radius: 8px;
    min-height: 34px;
    cursor: pointer;
}
.nav-logout-red:hover {
    color: #fff;
    background: #b91c1c;
    border-color: #dc2626;
    transform: translateY(-1px);
}
.nav-menu {
    position: relative;
}
.nav-menu-trigger::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-left: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.nav-submenu {
    min-width: 190px;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    display: grid;
    gap: 5px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}
.nav-menu:hover .nav-submenu,
.nav-menu:focus-within .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.nav-submenu a,
.nav-submenu button {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
}
.nav-submenu a:hover,
.nav-submenu button:hover,
.nav-submenu button.is-active {
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    transform: none;
    box-shadow: none;
}

.dashboard-main {
    padding: 30px 0 52px;
}
.topbar + main:not(.dashboard-main) {
    padding: 34px 0 60px;
}
.hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1 {
    margin-bottom: 5px;
    font-size: clamp(1.75rem, 3vw, 2.2rem);
    line-height: 1.08;
    letter-spacing: -0.048em;
}
.subtitle {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.88rem;
}
.section-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--cyan-dark);
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.button {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), #007782);
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(0, 140, 153, 0.17);
    font-size: 0.82rem;
    font-weight: 780;
    cursor: pointer;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}
.button:hover {
    color: #fff;
    background: linear-gradient(135deg, #007f8b, #006773);
    box-shadow: 0 11px 24px rgba(0, 111, 122, 0.23);
    transform: translateY(-1px);
}
.button.secondary {
    color: var(--navy);
    background: #fff;
    border-color: var(--line);
    box-shadow: none;
}
.button.secondary:hover {
    background: #f7fafc;
}
.download-icon {
    width: 15px;
    height: 16px;
    position: relative;
    border-bottom: 2px solid currentColor;
}
.download-icon::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    width: 2px;
    height: 10px;
    background: currentColor;
}
.download-icon::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 5px;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.metric {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(221, 229, 238, 0.95);
    border-radius: 11px;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(16, 47, 75, 0.1);
}
.metric-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}
.metric small {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 780;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}
.metric strong {
    display: block;
    margin-top: 3px;
    font-size: 1.18rem;
    line-height: 1;
    letter-spacing: -0.04em;
}
.metric-confirmed .metric-icon {
    color: var(--green);
    background: #e5f5ec;
}
.metric-pending .metric-icon {
    color: #235fa4;
    background: #e8f1fb;
}
.metric-action .metric-icon {
    color: var(--amber);
    background: #fff2dc;
}

.usage-card {
    margin-bottom: 18px;
}

.usage-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfe;
}
.usage-head h2 {
    margin: 0;
    font-size: 1.04rem;
    letter-spacing: -0.02em;
}
.usage-notice {
    margin: 14px 20px 0;
}
.usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px 20px 12px;
}
.usage-block {
    padding: 12px;
    background: #f8fbfe;
    border: 1px solid #e2e9f2;
    border-radius: 12px;
}
.usage-block h3 {
    margin: 0 0 7px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--cyan-dark);
}
.usage-block p {
    margin: 4px 0;
    color: var(--ink-soft);
    font-size: 0.75rem;
}
.usage-table-wrap {
    border-top: 1px solid var(--line);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.records-head {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
}
.records-head h2 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.records-head .section-kicker {
    margin-bottom: 3px;
}
.search-form {
    width: min(420px, 100%);
    display: flex;
    gap: 8px;
}
.search-input {
    position: relative;
    flex: 1;
}
.search-input > span {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid #8291a4;
    border-radius: 50%;
    transform: translateY(-55%);
    pointer-events: none;
}
.search-input > span::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 2px;
    background: #8291a4;
    transform: rotate(45deg);
    border-radius: 2px;
}
.search-input input {
    width: 100%;
    min-height: 39px;
    padding: 8px 36px 8px 39px;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid #d5dfe9;
    border-radius: 9px;
    outline: none;
    font-size: 0.82rem;
}
.search-input input:focus {
    background: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 140, 153, 0.1);
}
.search-input a {
    position: absolute;
    right: 12px;
    top: 50%;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    text-decoration: none;
    transform: translateY(-53%);
}
.search-button {
    box-shadow: none;
}
.records-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 20px;
    background: #fafbfd;
    border-bottom: 1px solid #eef2f7;
}

.nfe-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 14px 20px;
    background: #fcfcfd;
    border-bottom: 1px solid #eef2f7;
}
.nfe-filter-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(92px, 1fr));
    gap: 8px;
}
.nfe-filter-form .field label {
    margin-bottom: 3px;
    color: #6b7c93;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.nfe-filter-form .field input {
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 0.74rem;
}
.nfe-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}
.nfe-filter-actions .button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.74rem;
    white-space: nowrap;
}
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.filter {
    padding: 5px 10px;
    color: #65758a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.16s ease;
    letter-spacing: 0.01em;
}
.filter:hover {
    color: var(--navy);
    border-color: #b8c8d8;
}
.filter.active {
    color: #fff;
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: 0 5px 12px rgba(16, 47, 75, 0.14);
}
.result-count {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.77rem;
}
th,
td {
    padding: 11px 11px;
    border-bottom: 1px solid #e7edf3;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}
th {
    color: #748397;
    background: #f6f8fb;
    font-size: 0.66rem;
    font-weight: 820;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
tbody tr {
    transition: background 0.15s ease;
}
tbody tr:hover {
    background: #f8fbfc;
}
tbody tr:last-child td {
    border-bottom: 0;
}
.record-id {
    color: var(--cyan-dark);
    font-weight: 850;
}
.driver-name {
    color: var(--ink);
    font-weight: 720;
}
.pix-value {
    display: inline-block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}
.plate {
    padding: 4px 7px;
    color: #253c57;
    background: #edf2f7;
    border: 1px solid #d8e1ea;
    border-radius: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.04em;
}
.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 99px;
    background: #edf2f7;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 820;
}
.badge.confirmada {
    color: var(--green);
    background: #e5f5ec;
}
.badge.pendente_confirmacao {
    color: #175cd3;
    background: #eaf2ff;
}
.badge.precisa_correcao {
    color: var(--amber);
    background: #fff3df;
}
.badge.erro_ocr {
    color: var(--red);
    background: #ffebe9;
}
.document-link {
    font-weight: 750;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 111, 122, 0.3);
}
.document-link:hover {
    border-color: currentColor;
}

.pagination-bar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 20px;
    color: var(--muted);
    background: #fbfcfe;
    border-top: 1px solid var(--line);
}
.pagination-bar p {
    margin: 0;
    font-size: 0.79rem;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pagination a,
.pagination span {
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: none;
}
.pagination a:hover {
    background: #eef4f7;
}
.pagination a.active {
    color: #fff;
    background: var(--navy);
    box-shadow: 0 5px 13px rgba(16, 47, 75, 0.18);
}
.pagination .page-arrow {
    border-color: var(--line);
    background: #fff;
}
.pagination .disabled {
    opacity: 0.35;
    pointer-events: none;
}

.empty {
    padding: 64px 24px;
    color: var(--muted);
    text-align: center;
}
.empty-icon {
    width: 48px;
    height: 40px;
    display: block;
    position: relative;
    margin: 0 auto 18px;
    border: 2px solid #b8c8d8;
    border-radius: 8px;
}
.empty-icon::before {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    top: 10px;
    height: 2px;
    background: #b8c8d8;
    box-shadow:
        0 8px 0 #b8c8d8,
        0 16px 0 #b8c8d8;
}
.empty h3 {
    margin-bottom: 5px;
    color: var(--ink);
}
.empty p {
    margin-bottom: 18px;
}
.notice {
    padding: 13px 15px;
    border-radius: 10px;
    background: #fff3df;
    color: #714000;
}
.notice.error {
    background: #ffebe9;
    color: #8c1c13;
}
.notice.success {
    background: #e5f5ec;
    color: #11653f;
}
.notice-spaced {
    margin-top: 16px;
}
.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
    border: 1px solid rgba(17, 101, 63, 0.1);
    box-shadow: 0 8px 24px rgba(16, 47, 75, 0.07);
    animation: toast-enter 0.28s ease both;
}
.toast.error {
    border-color: rgba(180, 35, 24, 0.12);
}
.notice [data-notice-close] {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    color: currentColor;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid currentColor;
    border-radius: 7px;
    opacity: 0.6;
    cursor: pointer;
    line-height: 1;
}
.notice [data-notice-close]:hover {
    opacity: 1;
}
.notice.is-leaving {
    animation: toast-leave 0.24s ease forwards;
}
.modal-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}

.access-count {
    padding: 6px 10px;
    color: var(--green);
    background: #e5f5ec;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 800;
}
.authorized-list {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}
.authorized-user {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e1e8ef;
    border-radius: 10px;
}
.authorized-user strong {
    display: block;
    font-size: 0.8rem;
}
.authorized-user > div > span {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
}
.authorized-user > div > small {
    display: block;
    margin-top: 2px;
    color: var(--cyan-dark);
    font-size: 0.67rem;
    font-weight: 700;
}
.access-status {
    padding: 5px 8px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 800;
}
.access-status.active {
    color: var(--green);
    background: #e5f5ec;
}
.access-status.inactive {
    color: var(--red);
    background: #ffebe9;
}
.access-actions {
    display: flex;
    gap: 6px;
}
.access-actions form {
    margin: 0;
}
.mini-button {
    min-height: 30px;
    padding: 0 9px;
    color: var(--ink-soft);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 0.67rem;
    font-weight: 780;
    cursor: pointer;
}
.mini-button.warning {
    color: #8a5207;
    border-color: #efd6a5;
    background: #fff9eb;
}
.mini-button.success {
    color: var(--green);
    border-color: #bfe3ce;
    background: #eef9f3;
}
.mini-button.danger {
    color: var(--red);
    border-color: #efc2be;
    background: #fff5f4;
}
.access-empty {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

/* Modais */
body.modal-open {
    overflow: hidden;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 24, 39, 0.68);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}
.modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}
.modal-backdrop.locked-modal {
    z-index: 130;
}
.modal-backdrop.feedback-modal {
    z-index: 150;
}
.feedback-card {
    width: min(390px, 100%);
    max-height: none;
    padding: 24px;
    text-align: center;
}
.feedback-icon {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 10px;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    font-size: 1.45rem;
    font-weight: 900;
}
.feedback-modal.error .feedback-icon {
    background: var(--red);
}
.feedback-card h2 {
    margin: 0 0 6px;
    font-size: 1.12rem;
    letter-spacing: -0.03em;
}
.feedback-card p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.84rem;
}
.modal-panel {
    width: min(760px, 100%);
    max-height: min(88vh, 820px);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(3, 22, 36, 0.3);
    transform: translateY(14px) scale(0.985);
    transition: transform 0.2s ease;
}
.modal-backdrop.is-open .modal-panel {
    transform: none;
}
.admin-modal-panel {
    width: min(430px, 100%);
}
.performance-modal-panel {
    width: min(1120px, 100%);
}
.signup-modal-panel {
    width: min(720px, 100%);
}
.plan-modal-panel {
    width: min(860px, 100%);
}
.terms-accept-box {
    padding: 16px;
    border-radius: 14px;
    background: #f5fbfc;
    border: 1px solid #d5e7ef;
}
.check-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--ink);
    font-size: 0.86rem;
    line-height: 1.5;
}
.check-row input {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--teal);
}
.performance-modal-body {
    max-height: calc(90vh - 110px);
}
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px 17px;
    background: linear-gradient(145deg, #fff, #f5fafb);
    border-bottom: 1px solid var(--line);
}
.modal-header h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    letter-spacing: -0.035em;
}
.modal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.77rem;
}
.modal-close {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    color: #607186;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
.modal-close:hover {
    color: var(--red);
    background: #fff5f4;
    border-color: #efc2be;
}
.modal-body {
    max-height: calc(88vh - 105px);
    padding: 18px 22px 22px;
    overflow-y: auto;
}
.employee-modal-form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.employee-modal-form fieldset + fieldset {
    margin-top: 17px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}
.employee-modal-form legend {
    margin-bottom: 12px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 820;
}
.employee-modal-form legend > span {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    margin-right: 7px;
    color: #fff;
    background: var(--navy);
    border-radius: 7px;
    font-size: 0.65rem;
}
.employee-modal-form legend small {
    margin-left: 7px;
    padding: 3px 6px;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    border-radius: 99px;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.field label {
    display: block;
    margin-bottom: 5px;
}
.field input {
    width: 100%;
    min-height: 41px;
    padding: 8px 11px;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid #d5dfe9;
    border-radius: 9px;
    outline: none;
    font-size: 0.8rem;
}
.field input:focus {
    background: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 140, 153, 0.1);
}
.field-help,
.fieldset-intro {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.68rem;
}
.fieldset-intro {
    margin: -5px 0 11px;
}
.modal-password {
    position: relative;
}
.modal-password input {
    padding-right: 57px;
}
.modal-password button {
    position: absolute;
    right: 9px;
    top: 50%;
    padding: 3px;
    color: var(--cyan-dark);
    background: transparent;
    border: 0;
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.settings-card {
    padding: 0 0 16px;
}
.settings-form {
    padding: 14px 18px 4px;
}
.settings-form fieldset + fieldset {
    margin-top: 12px;
    padding-top: 12px;
}
.settings-form legend {
    margin-bottom: 9px;
}
.settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 12px;
}
.settings-grid-small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.settings-form .field label {
    margin-bottom: 4px;
    font-size: 0.66rem;
}
.settings-form .field input {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.74rem;
}
.settings-form .field select {
    width: 100%;
    min-height: 34px;
    padding: 6px 36px 6px 10px;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid #d5dfe9;
    border-radius: 8px;
    outline: none;
    font-size: 0.74rem;
    font-weight: 760;
    appearance: none;
}
.settings-form .field select:focus {
    background: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 140, 153, 0.1);
}
.ai-order-field {
    position: relative;
    align-self: end;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}
.ai-order-control {
    position: relative;
}
.ai-order-trigger {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px 6px 10px;
    color: #0f3650;
    background: #f8fafc;
    border: 1px solid #d5dfe9;
    border-radius: 8px;
    box-shadow: none;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 850;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.ai-order-trigger:hover,
.ai-order-control.is-open .ai-order-trigger {
    border-color: rgba(0, 140, 153, 0.42);
    box-shadow: 0 10px 24px rgba(0, 140, 153, 0.13);
}
.ai-order-trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 140, 153, 0.12), 0 10px 24px rgba(0, 140, 153, 0.13);
}
.ai-order-trigger i {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    background: #e8f6f7;
    border: 1px solid #b9e0e5;
    border-radius: 7px;
}
.ai-order-trigger i::before {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--cyan-dark);
    border-bottom: 2px solid var(--cyan-dark);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.16s ease;
}
.ai-order-control.is-open .ai-order-trigger i::before {
    transform: translateY(2px) rotate(225deg);
}
.ai-order-menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    padding: 6px;
    background: #fff;
    border: 1px solid #cddfe7;
    border-radius: 10px;
    box-shadow: 0 18px 42px rgba(15, 39, 58, 0.18);
}
.ai-order-option {
    width: 100%;
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    color: #263c53;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.ai-order-option + .ai-order-option {
    margin-top: 3px;
}
.ai-order-option strong {
    font-size: 0.73rem;
    font-weight: 880;
}
.ai-order-option small {
    color: #718196;
    font-size: 0.61rem;
    font-weight: 760;
}
.ai-order-option:hover,
.ai-order-option:focus-visible {
    outline: none;
    color: #0e5961;
    background: #eef9fa;
    border-color: #c5e5e9;
}
.ai-order-option.is-selected {
    color: #fff;
    background: linear-gradient(135deg, #008c99, #0c6570);
    border-color: #008c99;
}
.ai-order-option.is-selected small {
    color: rgba(255, 255, 255, 0.8);
}
.settings-form .check-field {
    display: flex;
    align-items: end;
}
.settings-form .check-field label {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0 10px;
    background: #f8fafc;
    border: 1px solid #d5dfe9;
    border-radius: 8px;
}
.settings-form .check-field input {
    width: 16px;
    min-height: auto;
    height: 16px;
    padding: 0;
}
.settings-form .modal-footer {
    margin-top: 14px;
}
.settings-section-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 9px;
}
.settings-save-button {
    min-height: 30px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(0, 140, 153, 0.12);
}
.settings-save-button::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 6px;
    background:
        linear-gradient(#fff, #fff) 50% 78% / 6px 2px no-repeat,
        linear-gradient(#fff, #fff) 50% 34% / 7px 4px no-repeat;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    filter: brightness(1.8);
}
.settings-form .modal-footer .button,
.settings-actions .button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.74rem;
}
.settings-actions {
    justify-content: flex-start;
    padding: 12px 18px 0;
    border-bottom: 0;
    background: transparent;
}
.authorized-section {
    margin-top: 21px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.authorized-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.authorized-title h3 {
    margin: 0;
    font-size: 0.9rem;
}
.admin-auth-form {
    padding: 20px 22px 22px;
}
.admin-auth-note {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 0.68rem;
}

/* Login */
.login-body {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #f2f7fb;
}
.login-page {
    height: 100vh;
    height: 100svh;
    max-height: 100vh;
    max-height: 100svh;
    display: grid;
    place-items: center;
    position: relative;
    isolation: isolate;
    padding: 42px 24px;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable both-edges;
    background: #f2f7fb;
}
/* Login decorative background elements */
.login-bg-decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.login-bg-nfe {
    position: absolute;
    top: 6%;
    left: 3%;
    opacity: 0.75;
    perspective: 600px;
    transform-style: preserve-3d;
    will-change: transform;
    animation: float-gentle 8s ease-in-out infinite alternate;
    filter: drop-shadow(0 8px 24px rgba(30, 64, 175, 0.12));
}
.login-bg-xml {
    position: absolute;
    bottom: 10%;
    left: 6%;
    opacity: 0.65;
    transform-style: preserve-3d;
    will-change: transform;
    animation: float-gentle 10s ease-in-out infinite alternate-reverse;
    filter: drop-shadow(0 6px 20px rgba(30, 64, 175, 0.1));
}
.login-bg-curves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
}
.login-bg-process {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0.75;
}
.login-bg-process-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #1a365d;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
}
.login-bg-process-arrow {
    color: #1a365d;
    font-size: 1.4rem;
    opacity: 0.4;
}
@keyframes float-gentle {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-14px); }
}
.login-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
    align-items: center;
    gap: clamp(36px, 6vw, 70px);
}
.login-intro {
    color: var(--ink);
    animation: enter-left 0.7s ease both;
}
.login-eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 9px;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    border: 1px solid rgba(0, 140, 153, 0.2);
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.16em;
}
.login-intro h1 {
    max-width: 500px;
    margin-bottom: 16px;
    font-size: clamp(2.15rem, 4.2vw, 3.45rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    color: var(--ink);
}
.login-intro > p {
    max-width: 500px;
    color: var(--muted);
    font-size: 0.89rem;
    line-height: 1.65;
}
.login-features {
    width: min(100%, 690px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    column-gap: 26px;
    row-gap: 8px;
    margin-top: 23px;
    color: var(--ink-soft);
    font-size: 0.76rem;
}
.login-plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}
.login-plan {
    position: relative;
    min-height: 118px;
    margin-top: 0;
    padding: 13px 12px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.login-plan:hover {
    transform: translateY(-3px);
    border-color: var(--cyan);
}
.login-plan.featured {
    border-color: var(--cyan);
}
.login-plan strong,
.login-plan span,
.login-plan small,
.login-plan b {
    display: block;
}
.login-plan strong {
    color: var(--ink);
    font-size: 0.86rem;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--cyan);
    margin-bottom: 6px;
}
.login-plan span,
.login-plan small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.68rem;
}
.login-plan b {
    margin-top: 10px;
    color: var(--cyan-dark);
    font-size: 1rem;
    font-weight: 800;
}
.login-plan-badge {
    position: absolute;
    top: 0;
    right: 10px;
    transform: translateY(-50%);
    z-index: 2;
    width: max-content;
    margin: 0;
    padding: 3px 7px;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.login-plan.popular-plan {
    border-color: var(--cyan);
    box-shadow: 0 4px 12px rgba(0, 140, 153, 0.15);
}
.login-footer {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 54px;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
}
.login-features span {
    display: flex;
    align-items: center;
    gap: 10px;
}
.login-features i {
    width: 17px;
    height: 17px;
    display: inline-block;
    position: relative;
    border: 1px solid var(--cyan);
    border-radius: 50%;
}
.login-features i::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 7px;
    height: 4px;
    border-left: 2px solid var(--cyan);
    border-bottom: 2px solid var(--cyan);
    transform: rotate(-45deg);
}
.login-card {
    width: 100%;
    max-width: 390px;
    justify-self: end;
    position: relative;
    z-index: 0;
    padding: clamp(24px, 3vw, 31px);
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    animation: enter-right 0.72s 0.08s ease both;
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 27px;
    color: var(--navy);
}
.login-brand strong {
    display: block;
    font-size: 0.79rem;
    letter-spacing: 0.03em;
}
.login-brand small {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.57rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}
.login-heading > span {
    color: var(--cyan-dark);
    font-size: 0.69rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}
.login-heading h2 {
    margin: 4px 0 6px;
    font-size: 1.68rem;
    letter-spacing: -0.045em;
}
.login-heading p {
    margin-bottom: 19px;
    color: var(--muted);
    font-size: 0.79rem;
}
.login-form label {
    display: block;
    margin: 13px 0 6px;
    color: var(--ink-soft);
    font-size: 0.7rem;
    font-weight: 780;
}
.input-wrap {
    position: relative;
}
.input-wrap input {
    width: 100%;
    min-height: 42px;
    padding: 8px 44px 8px 40px;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid #d3dee8;
    border-radius: 9px;
    outline: none;
    transition: all 0.18s ease;
    font-size: 0.82rem;
}
.input-wrap input:focus {
    background: #fff;
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(0, 140, 153, 0.1);
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 12px;
    width: 14px;
    height: 14px;
    z-index: 1;
    border: 2px solid #8595a7;
    border-radius: 50%;
    pointer-events: none;
}
.input-icon::after {
    content: "";
    position: absolute;
    left: -4px;
    top: 12px;
    width: 19px;
    height: 9px;
    border: 2px solid #8595a7;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
}
.input-icon.lock {
    top: 14px;
    height: 13px;
    border-radius: 3px;
}
.input-icon.lock::after {
    left: 2px;
    top: -9px;
    width: 7px;
    height: 9px;
    border: 2px solid #8595a7;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
}
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    padding: 4px;
    color: var(--cyan-dark);
    background: transparent;
    border: 0;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transform: translateY(-50%);
}
.login-button {
    width: 100%;
    min-height: 43px;
    margin-top: 19px;
    justify-content: space-between;
    padding: 0 15px;
}
.login-button span {
    font-size: 1.15rem;
    transition: transform 0.18s ease;
}
.login-button:hover span {
    transform: translateX(3px);
}
.login-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.login-actions .button {
    min-height: 39px;
    width: 100%;
    padding: 0 12px;
    font-size: 0.78rem;
}
.login-client-shortcut {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan-dark);
    background: #f2fbfc;
    border: 1px solid #c7e8ec;
    border-radius: 9px;
    font-size: 0.78rem;
    font-weight: 820;
    text-decoration: none;
    transition: all 0.18s ease;
}
.login-client-shortcut:hover {
    color: #fff;
    background: var(--cyan);
    border-color: var(--cyan);
    transform: translateY(-1px);
}
.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 15px 0 0;
    color: #8391a1;
    font-size: 0.62rem;
}

.signup-form .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-choice-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.plan-choice-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: linear-gradient(145deg, #fff, #f8fbfc);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.plan-choice-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 140, 153, 0.32);
}
.plan-choice-card strong {
    color: var(--ink);
    font-size: 1rem;
}
.plan-choice-card span,
.plan-choice-card small {
    color: var(--muted);
    font-size: 0.74rem;
}
.plan-choice-card b {
    margin: 6px 0 8px;
    color: var(--cyan-dark);
    font-size: 1.24rem;
}
.plan-choice-card .button {
    margin-top: auto;
    min-height: 38px;
    width: 100%;
    font-size: 0.78rem;
}
.plan-lock-note {
    margin: 14px 0 0;
    padding: 11px 13px;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    border-left: 3px solid var(--cyan);
    border-radius: 10px;
    font-size: 0.78rem;
}
.logo-field input[type="file"] {
    min-height: auto;
    padding: 8px;
}
.logo-preview {
    width: auto;
    height: 42px;
    max-width: 180px;
    display: block;
    margin: 6px 0 8px;
    object-fit: contain;
}
.logo-preview-large {
    height: 54px;
    max-width: 240px;
}
.plan-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.plan-admin-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.plan-admin-card label {
    display: grid;
    gap: 5px;
}
.plan-admin-card input {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.client-login-body {
    background: #061f33;
}
.client-login-page {
    height: 100vh;
    height: 100svh;
    max-height: 100vh;
    max-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable both-edges;
    background:
        linear-gradient(135deg, rgba(6,31,51,0.98), rgba(0,92,104,0.78)),
        radial-gradient(circle at 18% 18%, rgba(105,229,235,0.22), transparent 24rem),
        radial-gradient(circle at 88% 70%, rgba(255,255,255,0.12), transparent 28rem);
}
.client-login-page::before {
    content: "";
    position: absolute;
    inset: 7%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    pointer-events: none;
    contain: paint;
    animation: rings 9s ease-in-out infinite alternate;
}
.client-login-shell {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
    gap: clamp(24px, 6vw, 64px);
    align-items: center;
}
.client-login-copy {
    color: #fff;
    animation: enter-left 0.65s ease both;
}
.client-login-copy h1 {
    max-width: 480px;
    margin: 12px 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
}
.client-login-copy p {
    max-width: 460px;
    color: #c8dce4;
    font-size: 0.92rem;
    line-height: 1.65;
}
.client-login-card {
    justify-self: end;
}
.single-action {
    grid-template-columns: 1fr;
}
.login-security span {
    width: 10px;
    height: 8px;
    position: relative;
    border: 1.5px solid var(--muted);
    border-radius: 2px;
}
.login-security span::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -7px;
    width: 5px;
    height: 6px;
    border: 1.5px solid var(--muted);
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
}

.settings {
    padding: 24px;
}
.settings dl {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 12px 20px;
    margin: 0;
}
.settings dt {
    color: var(--muted);
    font-weight: 700;
}
.settings dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
code {
    padding: 2px 5px;
    background: #eef3f7;
    border-radius: 5px;
}
.hash-output {
    overflow-wrap: anywhere;
}

/* Splash de entrada/saida */
.welcome-splash,
.logout-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 24% 20%, rgba(26, 188, 198, 0.22), transparent 26rem),
        rgba(4, 21, 34, 0.86);
    backdrop-filter: blur(8px);
}
.welcome-splash {
    pointer-events: none;
}
.welcome-splash[data-auto-splash] {
    animation: splashFallback 0.35s ease 3.35s both;
}
.logout-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.logout-overlay.active {
    opacity: 1;
    visibility: visible;
}
.ws-card {
    width: min(390px, 100%);
    padding: 28px;
    border-radius: 20px;
    color: #eefcff;
    background: linear-gradient(145deg, rgba(6, 38, 58, 0.96), rgba(0, 118, 130, 0.92));
    border: 1px solid rgba(132, 239, 246, 0.24);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.34);
}
.welcome-splash.in .ws-card,
.logout-overlay.active .ws-card {
    animation: wsIn 0.34s ease both;
}
.welcome-splash.out .ws-card {
    animation: wsOut 0.34s ease both;
}
.ws-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}
.ws-avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #07354a;
    background: #86eef3;
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(20, 209, 217, 0.28);
}
.ws-badge {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #aef8fb;
    background: rgba(255, 255, 255, 0.08);
}
.ws-greet {
    margin: 0 0 4px;
    color: #bde8ee;
    font-weight: 700;
}
.ws-name {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
    color: #fff;
}
.ws-sub {
    margin: 12px 0 20px;
    color: #c6e3ea;
}
.ws-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}
.ws-bar-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #82f2f4, #ffffff);
    transform-origin: left;
    animation: wsBar 2.6s ease both;
}
.logout-overlay .ws-bar-fill {
    animation-duration: 1.45s;
}
.pix-plan-panel {
    width: min(780px, 100%);
}
.success-modal-panel {
    width: min(420px, 100%);
    padding: 30px 24px;
    text-align: center;
}
.payment-success-icon {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 12px;
    color: #fff;
    background: linear-gradient(135deg, #11a46b, #0b7d55);
    border-radius: 50%;
    box-shadow: 0 16px 34px rgba(17, 164, 107, 0.28);
    font-size: 1.7rem;
    font-weight: 900;
}
.success-modal-panel h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}
.success-modal-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}
.pix-plan-body {
    display: grid;
    gap: 16px;
}
.pix-loading {
    padding: 22px;
    border: 1px dashed #b7d4df;
    border-radius: 14px;
    color: var(--muted);
    text-align: center;
    background: #f5fbfc;
}
.pix-payment-box {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}
.pix-qr-frame {
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
    padding: 10px;
    border: 1px solid #d5e7ef;
    border-radius: 16px;
    background: #fff;
}
.pix-qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pix-payment-info {
    display: grid;
    gap: 10px;
}
.pix-payment-info strong {
    color: var(--teal);
    font-size: 1.5rem;
}
.pix-payment-info > span {
    color: var(--muted);
    font-size: 0.86rem;
}
.pix-payment-info textarea {
    width: 100%;
    resize: vertical;
    min-height: 88px;
    font-size: 0.78rem;
    line-height: 1.45;
}
.client-dashboard {
    display: grid;
    justify-items: start;
    gap: 14px;
    margin-bottom: 16px;
}
.client-plan-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    width: fit-content;
    max-width: 100%;
}
.client-plan-strip h2 {
    margin: 4px 0 0;
    font-size: 1.15rem;
}
.client-plan-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.client-plan-stats span {
    padding: 7px 9px;
    border-radius: 8px;
    color: var(--muted);
    background: #f4f8fb;
    border: 1px solid #e0ebf2;
    font-size: 0.72rem;
}
.client-plan-stats strong {
    color: var(--ink);
}
.client-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.client-module-card {
    display: grid;
    gap: 7px;
    min-height: 96px;
    padding: 16px;
    text-align: left;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.client-module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 137, 145, 0.38);
    box-shadow: 0 16px 34px rgba(15, 36, 52, 0.12);
}
.client-module-card strong {
    color: var(--navy);
    font-size: 0.95rem;
}
.client-module-card span {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}
.client-module-card.locked {
    opacity: 0.88;
}
.plan-logout-form {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

@keyframes enter-left {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes enter-right {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes drift {
    from {
        transform: translate3d(0, -8px, 0) scale(0.95);
    }
    to {
        transform: translate3d(30px, 20px, 0) scale(1.08);
    }
}
@keyframes rings {
    from {
        transform: scale(0.92);
        opacity: 0.55;
    }
    to {
        transform: scale(1.06);
        opacity: 1;
    }
}
@keyframes wsIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes wsOut {
    from {
        opacity: 1;
        transform: none;
    }
    to {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
}
@keyframes wsBar {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}
@keyframes splashFallback {
    to {
        opacity: 0;
        visibility: hidden;
    }
}
@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes toast-leave {
    to {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        overflow: hidden;
    }
}
@keyframes rgb-border-shift {
    0% {
        background-position:
            0 0,
            0% 50%;
    }
    50% {
        background-position:
            0 0,
            100% 50%;
    }
    100% {
        background-position:
            0 0,
            0% 50%;
    }
}
@keyframes rgb-border-pulse {
    0%,
    100% {
        opacity: 0.22;
    }
    50% {
        opacity: 0.48;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.publication-update-float {
    position: fixed;
    right: clamp(14px, 2vw, 22px);
    bottom: clamp(82px, 9vh, 108px);
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
    max-width: min(330px, calc(100vw - 28px));
    padding: 10px 12px 10px 10px;
    border: 1px solid rgba(157, 178, 191, .34);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    color: var(--ink, #102f4b);
    box-shadow: 0 18px 42px rgba(16, 47, 75, .18);
    backdrop-filter: blur(14px);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, border-color .22s ease, background .22s ease;
}
.publication-update-float.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.publication-update-float.is-pending {
    border-color: rgba(250, 204, 21, .76);
    background: linear-gradient(135deg, rgba(255, 251, 235, .98), rgba(236, 253, 245, .95));
    box-shadow: 0 20px 48px rgba(146, 64, 14, .2);
}
.client-plan-strip.has-publication-update {
    position: relative;
}
.publication-update-float.is-contained {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: auto;
    min-width: 0;
    width: 174px;
    max-width: calc(100% - 24px);
    min-height: 48px;
    padding: 7px 9px;
    gap: 8px;
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(16, 47, 75, .12);
}
.publication-update-float.is-contained .publication-update-float-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
    font-size: .92rem;
}
.publication-update-float.is-contained .publication-update-float-title {
    font-size: .72rem;
}
.publication-update-float.is-contained .publication-update-float-help {
    font-size: .59rem;
    line-height: 1.18;
}
.publication-update-float.is-contained .publication-update-float-badge {
    width: 17px;
    height: 17px;
    top: -6px;
    right: -6px;
    font-size: .64rem;
}
.publication-update-float:focus-visible {
    outline: 3px solid rgba(0, 140, 153, .26);
    outline-offset: 3px;
}
.publication-update-float-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--cyan-soft, #d9f7f8);
    color: var(--cyan-dark, #006d75);
    font-size: 1.05rem;
    font-weight: 900;
}
.publication-update-float.is-pending .publication-update-float-icon {
    background: #facc15;
    color: #78350f;
}
.publication-update-float-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
    text-align: left;
}
.publication-update-float-title {
    font-size: .82rem;
    font-weight: 860;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.publication-update-float-help {
    font-size: .68rem;
    color: var(--muted, #64748b);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.publication-update-float-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}
.publication-update-float-badge[hidden] {
    display: none;
}
.publication-update-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7, 22, 34, .46);
    backdrop-filter: blur(6px);
}
.publication-update-modal[hidden] {
    display: none;
}
.publication-update-modal-box {
    width: min(430px, 100%);
    border: 1px solid rgba(255, 255, 255, .64);
    border-radius: 18px;
    padding: 24px;
    background: #fff;
    color: var(--ink, #102f4b);
    box-shadow: 0 28px 70px rgba(7, 22, 34, .26);
}
.publication-update-modal-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 16px;
    background: #fef3c7;
    color: #92400e;
    font-size: 1.25rem;
    font-weight: 900;
}
.publication-update-modal-box h2 {
    margin: 0 0 8px;
    font-size: 1.18rem;
    line-height: 1.2;
}
.publication-update-modal-box p {
    margin: 0;
    color: var(--muted, #64748b);
    line-height: 1.5;
    font-size: .92rem;
}
.publication-update-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.publication-update-modal-actions .button,
.publication-update-modal-actions button {
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    padding: 0 15px;
    font-weight: 780;
    cursor: pointer;
}
.publication-update-modal-actions .publication-update-cancel {
    background: var(--paper, #f1f5f9);
    color: var(--ink-soft, #31526b);
}
.publication-update-modal-actions .publication-update-confirm {
    background: linear-gradient(135deg, var(--navy, #102f4b), var(--cyan-dark, #006d75));
    color: #fff;
}
@media (max-width: 700px) {
    .publication-update-float {
        left: 14px;
        right: 14px;
        bottom: 76px;
        width: auto;
        max-width: none;
    }
    .publication-update-float.is-contained {
        position: relative;
        inset: auto;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        order: 2;
    }
    .publication-update-modal-actions {
        flex-direction: column-reverse;
    }
    .publication-update-modal-actions button {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .client-plan-strip {
        align-items: flex-start;
        flex-direction: column;
    }
    .client-plan-stats {
        justify-content: flex-start;
    }
    .client-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .records-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .search-form {
        width: 100%;
    }
    .nfe-filter-form {
        grid-template-columns: 1fr;
    }
    .nfe-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .settings-grid,
    .settings-grid-small {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .login-shell {
        max-width: 500px;
        grid-template-columns: 1fr;
        place-items: center;
    }
    .client-login-shell {
        max-width: 430px;
        grid-template-columns: 1fr;
    }
    .client-login-copy {
        display: none;
    }
    .login-intro {
        display: none;
    }
    .login-card {
        max-width: 430px;
        justify-self: center;
    }
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 20px, 1240px);
    }
    .topbar-inner {
        min-height: auto;
        padding: 13px 0;
        align-items: flex-start;
        flex-direction: column;
    }
    .nav {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 8px;
    }
    .nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .nav a,
    .nav-logout,
    .nav-action {
        padding: 0 8px;
    }
    .dashboard-main {
        padding-top: 28px;
    }
    .hero {
        align-items: stretch;
        flex-direction: column;
    }
    .hero .button {
        width: 100%;
    }
    .metrics {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .client-module-grid {
        grid-template-columns: 1fr;
    }
    .metric {
        min-height: 100px;
        padding: 16px;
        gap: 11px;
    }
    .metric-icon {
        width: 34px;
        height: 34px;
    }
    .metric strong {
        font-size: 1.55rem;
    }
    .records-head,
    .records-toolbar,
    .pagination-bar {
        padding-left: 15px;
        padding-right: 15px;
    }
    .search-form {
        flex-direction: column;
    }
    .records-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }
    .pagination {
        max-width: 100%;
        flex-wrap: wrap;
    }
    .login-page {
        align-items: center;
        padding: max(18px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
    }
    .login-shell {
        width: 100%;
        max-width: 430px;
    }
    .login-card {
        width: min(100%, 430px);
        padding: 26px 20px;
        border-radius: 17px;
    }
    .modal-backdrop {
        padding: 10px;
        align-items: end;
    }
    .modal-panel {
        max-height: 94vh;
        border-radius: 17px 17px 10px 10px;
    }
    .pix-payment-box {
        grid-template-columns: 1fr;
    }
    .pix-qr-frame {
        justify-self: center;
    }
    .modal-body {
        max-height: calc(94vh - 100px);
        padding: 15px;
    }
    .modal-header,
    .admin-auth-form {
        padding-left: 15px;
        padding-right: 15px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .settings-grid,
    .settings-grid-small {
        grid-template-columns: 1fr;
    }
    .signup-form .settings-grid,
    .plan-choice-grid,
    .login-actions,
    .plan-admin-grid {
        grid-template-columns: 1fr;
    }
    .plan-choice-card {
        min-height: 0;
    }
    .nfe-filter-form {
        grid-template-columns: 1fr;
        padding-left: 15px;
        padding-right: 15px;
    }
    .nfe-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nfe-filter-actions {
        justify-content: flex-start;
    }
    .authorized-user {
        grid-template-columns: 1fr auto;
    }
    .access-actions {
        grid-column: 1 / -1;
    }
    .modal-footer .button {
        flex: 1;
    }
}

@media (max-width: 420px) {
    .login-page {
        padding-left: 10px;
        padding-right: 10px;
    }
    .login-card {
        padding: 22px 16px;
        border-radius: 14px;
    }
    .login-brand {
        margin-bottom: 20px;
    }
    .login-heading h2 {
        font-size: 1.42rem;
    }
    .login-heading p {
        margin-bottom: 15px;
    }
    .input-wrap input {
        min-height: 44px;
    }

/* NFe Cards - Compacto */
.nfe-cards {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.nfe-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nfe-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--cyan-soft);
}

.nfe-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.nfe-card-header:hover {
    background: rgba(0, 140, 153, 0.03);
}

.nfe-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.nfe-card-id {
    font-size: 0.7rem;
    font-weight: 750;
    color: var(--muted);
    white-space: nowrap;
}

.nfe-card-emitente {
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nfe-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nfe-card-valor {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--green);
    white-space: nowrap;
}

.nfe-card-placa {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.nfe-card-status {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nfe-card-status.confirmada {
    color: var(--green);
    background: rgba(20, 122, 80, 0.1);
}

.nfe-card-status.aguardando_confirmacao {
    color: var(--amber);
    background: rgba(164, 93, 0, 0.1);
}

.nfe-card-status.erro {
    color: var(--red);
    background: rgba(180, 35, 24, 0.1);
}

.nfe-card-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.nfe-card.is-open .nfe-card-toggle {
    transform: rotate(180deg);
}

.nfe-card-details {
    display: none;
    padding: 0 14px 12px;
    border-top: 1px solid var(--line);
}

.nfe-card.is-open .nfe-card-details {
    display: block;
}

.nfe-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding-top: 10px;
}

.nfe-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nfe-detail-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nfe-detail-value {
    font-size: 0.78rem;
    color: var(--ink);
    word-break: break-all;
}

.nfe-detail-value code {
    font-size: 0.72rem;
    background: var(--paper);
    padding: 2px 5px;
    border-radius: 4px;
}

.nfe-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.nfe-card-actions a {
    font-size: 0.7rem;
    font-weight: 650;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.nfe-card-actions .btn-xml {
    color: var(--cyan-dark);
    background: var(--cyan-soft);
}

.nfe-card-actions .btn-xml:hover {
    background: rgba(0, 140, 153, 0.2);
}

.nfe-card-actions .btn-pdf {
    color: var(--red);
    background: rgba(180, 35, 24, 0.08);
}

.nfe-card-actions .btn-pdf:hover {
    background: rgba(180, 35, 24, 0.15);
}

@media (max-width: 600px) {
    .nfe-card-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    .nfe-card-meta {
        width: 100%;
        justify-content: space-between;
    }
    .nfe-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}
}

/* ── Billing cards (painel do cliente) ── */
.billing-card-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 6px;
}
.billing-card {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: none;
    flex: 0 1 276px;
    min-width: 0;
    max-width: 300px;
}
.billing-expiry-card {
    display: flex;
    align-items: center;
    gap: 11px;
}
.billing-expiry-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
}
.billing-expiry-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.billing-expiry-info small {
    color: var(--muted);
    font-size: 0.61rem;
    font-weight: 780;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.billing-expiry-info strong {
    font-size: .84rem;
    line-height: 1.1;
    letter-spacing: -.02em;
}
.billing-expiry-value {
    text-align: right;
    flex: 0 0 auto;
}
.billing-expiry-value small {
    display: block;
    color: var(--muted);
    font-size: 0.59rem;
    font-weight: 760;
    margin-bottom: 1px;
}
.billing-expiry-value strong {
    font-size: .86rem;
    letter-spacing: -.02em;
}
.billing-days-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 99px;
    font-size: 0.6rem;
    font-weight: 800;
    width: fit-content;
    white-space: nowrap;
}
/* PIX card */
.billing-pix-card { display: flex; flex-direction: column; }
.billing-pix-initial {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.billing-pix-btn {
    min-height: 28px;
    padding: 0 10px;
    font-size: .7rem;
    border-radius: 8px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}
.billing-pix-qr-area { display: flex; flex-direction: column; gap: 7px; }
.billing-qr-inner { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.billing-qr-img { width: 82px; height: 82px; border-radius: 7px; border: 1px solid var(--line); flex-shrink: 0; }
.billing-qr-info { flex: 1; min-width: 120px; }
.billing-qr-label { font-size: .62rem; color: var(--muted); margin-bottom: 4px; }
.billing-qr-copy-row { display: flex; gap: 5px; margin-bottom: 4px; }
.billing-qr-input {
    flex: 1; min-width: 0;
    background: #f8fafc; border: 1px solid var(--line); border-radius: 6px;
    padding: 4px 7px; font-family: ui-monospace,monospace; font-size: .61rem; color: var(--ink);
}
.billing-qr-expiry { font-size: .61rem; color: var(--muted); margin-bottom: 2px; }
.billing-qr-status { font-size: .66rem; color: var(--amber); display: flex; align-items: center; gap: 4px; }
/* Histórico */
.billing-history-card { max-height: 150px; overflow-y: auto; }
.billing-history-title {
    font-size: .64rem; font-weight: 820; color: var(--ink-soft);
    margin-bottom: 6px; letter-spacing: .05em; text-transform: uppercase;
}
.billing-history-list { display: flex; flex-direction: column; gap: 4px; }
.billing-history-item {
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    padding: 5px 8px; background: #f8fafc; border: 1px solid #e8edf3;
    border-radius: 7px; font-size: .69rem; color: var(--ink-soft);
}
.billing-history-item.pending { background: #fffbf0; border-color: #ffe4a0; }
.billing-badge {
    padding: 2px 7px; border-radius: 99px; font-size: .61rem; font-weight: 820;
    background: #edf2f7; color: var(--muted); white-space: nowrap; flex-shrink: 0;
}
.billing-badge.paga     { background:#e5f5ec; color:var(--green); }
.billing-badge.pendente { background:#fff3df; color:var(--amber); }
.billing-badge.cancelado{ background:#ffebe9; color:var(--red);   }
@media (max-width: 720px) {
    .billing-card { max-width: 100%; flex-basis: 100%; }
}

[hidden] {
    display: none !important;
}
.client-plan-strip {
    display: inline-grid;
    justify-content: start;
    align-items: flex-start;
}
.client-plan-billing {
    display: inline-flex;
    flex-wrap: nowrap;
    width: max-content;
    max-width: 100%;
    margin: 8px 0 0;
}
.client-plan-billing .billing-card {
    flex: 0 0 262px;
}
@media (max-width: 720px) {
    .client-plan-strip {
        width: 100%;
    }
    .client-plan-billing {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    .client-plan-billing .billing-card {
        flex: 1 1 100%;
    }
}
.billing-pix-success {
    display: grid;
    gap: 2px;
    margin-top: 8px;
    padding: 8px 10px;
    color: var(--green);
    background: #e5f5ec;
    border: 1px solid #bfe3ce;
    border-radius: 8px;
    font-size: .72rem;
}
.billing-pix-success span {
    color: #315c49;
    font-size: .66rem;
}
.billing-expiry-card {
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.billing-expiry-card .billing-expiry-icon {
    background: #f3f6fa;
}
.billing-expiry-card.billing-expiry-good {
    border-color: rgba(20, 122, 80, .20);
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(240, 253, 244, .72));
}
.billing-expiry-card.billing-expiry-good .billing-expiry-icon {
    background: #e8f7ee;
}
.billing-expiry-card.billing-expiry-soon {
    border-color: rgba(180, 103, 0, .22);
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255, 248, 230, .82));
}
.billing-expiry-card.billing-expiry-soon .billing-expiry-icon {
    background: #fff3df;
}
.billing-expiry-card.billing-expiry-expired {
    border-color: rgba(180, 35, 24, .24);
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255, 241, 240, .84));
    box-shadow: 0 14px 34px rgba(180, 35, 24, .07);
}
.billing-expiry-card.billing-expiry-expired .billing-expiry-icon {
    background: #fff0ee;
}
.billing-expiry-card.billing-expiry-neutral {
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(247, 250, 252, .88));
}
.billing-upgrade-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-color: rgba(0, 140, 153, .18);
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(241, 250, 251, .96)),
        radial-gradient(circle at 100% 0, rgba(0, 140, 153, .16), transparent 46%);
}
.billing-upgrade-card::after {
    content: "";
    position: absolute;
    inset: auto -30px -46px auto;
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, rgba(20, 122, 80, .13), transparent 64%);
    pointer-events: none;
}
.billing-upgrade-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.billing-upgrade-card .billing-expiry-icon {
    color: var(--cyan-dark);
    background: #e2f5f6;
}
.billing-upgrade-card svg {
    width: 19px;
    height: 19px;
}
.billing-upgrade-button {
    position: relative;
    z-index: 1;
    min-height: 30px;
    padding: 0 12px;
    font-size: .72rem;
    white-space: nowrap;
}
.plan-current-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-top: 9px;
    padding: 0 8px;
    color: var(--green);
    background: #e5f5ec;
    border: 1px solid #bfe3ce;
    border-radius: 99px;
    font-size: .62rem;
    font-style: normal;
    font-weight: 850;
}
.custom-plan-card {
    position: relative;
    overflow: hidden;
    color: #082b3d;
    text-decoration: none;
    background:
        linear-gradient(135deg, #ffffff, #f6fbfc 58%, #ecf8f9),
        radial-gradient(circle at 100% 0, rgba(0, 140, 153, .2), transparent 42%);
    border-color: rgba(0, 140, 153, .2);
}
.custom-plan-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.78) 48%, transparent 70%);
    transform: translateX(-70%);
    transition: transform .45s ease;
}
.custom-plan-card:hover::before {
    transform: translateX(70%);
}
.custom-plan-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin-bottom: 7px;
    padding: 0 8px;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    border: 1px solid rgba(0, 140, 153, .16);
    border-radius: 99px;
    font-size: .62rem;
    font-weight: 880;
    text-transform: uppercase;
}
.custom-plan-button {
    position: relative;
    z-index: 1;
    margin-top: auto;
    background: #168a5a;
    border-color: #168a5a;
}
@keyframes billing-spin { to { transform: rotate(360deg); } }

/* Ajustes finais do portal do cliente */
.client-dashboard {
    grid-template-columns: minmax(520px, max-content) minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 8px;
    justify-items: stretch;
}
.client-plan-strip {
    grid-column: 1;
    grid-row: 1 / span 2;
}
.client-dashboard .client-module-grid {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(112px, 1fr));
    gap: 8px;
}
.client-dashboard .client-module-card {
    min-height: 74px;
    padding: 12px 14px;
    gap: 6px;
}
.client-dashboard .client-module-card strong {
    font-size: 0.86rem;
}
.client-dashboard .client-module-card span {
    font-size: 0.68rem;
    line-height: 1.35;
}
.client-metrics-compact {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(112px, 1fr));
    gap: 8px;
    margin-bottom: 0;
}
.client-metrics-compact .metric {
    min-height: 58px;
    padding: 9px 10px;
    gap: 9px;
    border-radius: 8px;
}
.client-metrics-compact .metric-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    font-size: 0.54rem;
}
.client-metrics-compact .metric small {
    font-size: 0.56rem;
    letter-spacing: 0.05em;
}
.client-metrics-compact .metric strong {
    font-size: 1rem;
}
@media (max-width: 1180px) {
    .client-dashboard {
        grid-template-columns: 1fr;
    }
    .client-plan-strip,
    .client-dashboard .client-module-grid,
    .client-metrics-compact {
        grid-column: 1;
        grid-row: auto;
    }
    .client-dashboard .client-module-grid,
    .client-metrics-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 680px) {
    .client-dashboard .client-module-grid,
    .client-metrics-compact {
        grid-template-columns: 1fr;
    }
}
.client-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: min(100%, 300px);
}
.client-profile-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, #008c99, #0f6b78);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 10px 24px rgba(0, 72, 84, 0.18);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.client-profile-avatar:hover,
.client-profile-avatar:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 72, 84, 0.24);
    outline: none;
}
.client-profile-avatar span {
    font-size: .82rem;
    font-weight: 900;
}
.client-profile-avatar.large {
    width: 54px;
    height: 54px;
    border: 0;
    cursor: default;
}
.client-profile-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}
.client-profile-head h2 {
    margin: 2px 0 3px;
    font-size: 1.06rem;
}
.client-profile-head p {
    margin: 0;
    color: var(--muted);
    font-size: .75rem;
}
.client-profile-panel {
    width: min(430px, 100%);
}
.client-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 18px 18px;
}
.client-profile-grid div {
    min-width: 0;
    padding: 10px 11px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.client-profile-grid small {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .61rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.client-profile-grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: .78rem;
}
.client-login-shell {
    width: min(860px, 100%);
    grid-template-columns: minmax(0, .92fr) minmax(300px, 360px);
    gap: clamp(18px, 4vw, 42px);
}
.client-login-copy h1 {
    max-width: 440px;
    font-size: clamp(1.65rem, 3.2vw, 2.55rem);
    line-height: 1.08;
    letter-spacing: 0;
}
.client-login-copy p {
    max-width: 410px;
    font-size: .86rem;
}
.client-login-card {
    max-width: 360px;
    padding: 21px;
    border-radius: 16px;
}
.client-login-card::after {
    inset: -5px;
    opacity: .22;
    filter: blur(7px);
}
.client-login-card .login-brand {
    margin-bottom: 18px;
}
.client-login-card .login-heading h2 {
    font-size: 1.42rem;
    letter-spacing: 0;
}
.client-login-card .login-heading p {
    margin-bottom: 12px;
}
.client-login-card .login-form label {
    margin: 10px 0 5px;
}
.client-login-card .input-wrap input {
    min-height: 38px;
    font-size: .78rem;
}
.client-login-card .login-button {
    min-height: 39px;
    margin-top: 14px;
}
.login-actions.single-action {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
}
.login-actions.single-action .login-client-shortcut {
    min-height: 31px;
    padding: 0 9px;
    flex: 1 1 0;
    white-space: nowrap;
    font-size: .68rem;
}
.reset-password-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.reset-password-card {
    justify-self: center;
    max-width: 390px;
}
@keyframes client-card-in {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 900px) {
    .client-login-shell {
        max-width: 390px;
        grid-template-columns: 1fr;
    }
    .client-login-card {
        max-width: 390px;
        justify-self: center;
    }
}
@media (max-width: 680px) {
    .login-actions.single-action {
        flex-direction: row;
    }
    .login-actions.single-action .login-client-shortcut {
        font-size: .64rem;
        padding: 0 7px;
    }
    .client-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Login padronizado - Clean white design */
.login-page,
.client-login-page {
    isolation: isolate;
}
.login-shell,
.client-login-shell,
.login-card,
.login-footer {
    position: relative;
    z-index: 1;
}
.login-card .login-brand,
.client-login-card .login-brand {
    margin-bottom: 18px;
}
.login-card .login-heading h2,
.client-login-card .login-heading h2 {
    font-size: 1.42rem;
    letter-spacing: 0;
}
.login-card .login-heading p,
.client-login-card .login-heading p {
    margin-bottom: 12px;
}
.login-card .login-form label,
.client-login-card .login-form label {
    margin: 10px 0 5px;
}
.login-card .input-wrap input,
.client-login-card .input-wrap input {
    min-height: 38px;
    font-size: .78rem;
}
.login-card .login-button,
.client-login-card .login-button {
    min-height: 39px;
    margin-top: 14px;
}
.login-intro h1,
.client-login-copy h1 {
    letter-spacing: 0;
}
.client-login-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: 500px;
    margin-top: 22px;
}
.client-login-features span {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    color: #dff7fa;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(141, 225, 229, .18);
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 720;
}
.client-login-features span::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    background: #72e2e8;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(114, 226, 232, .12);
}
.system-footer {
    padding: 14px 16px 18px;
    color: #708198;
    font-size: .72rem;
    text-align: center;
}
.saas-body .system-footer {
    color: #6f7f91;
}
.dashboard-main {
    padding-bottom: 16px;
}
@keyframes login-polish-sweep {
    0%, 100% { opacity: .58; transform: translateX(-18%) rotate(-2deg); }
    50% { opacity: .9; transform: translateX(18%) rotate(-2deg); }
}
@keyframes login-card-rise {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 900px) {
    .login-shell {
        max-width: 390px;
        grid-template-columns: 1fr;
    }
    .login-card {
        justify-self: center;
    }
}
@media (max-width: 680px) {
    .client-login-features {
        grid-template-columns: 1fr;
    }
}

/* Ajustes suporte WhatsApp e encaixe dos planos no login master */
.login-page {
    align-items: start;
    padding-top: clamp(34px, 5vh, 56px);
    padding-bottom: 118px;
}
.login-shell {
    align-self: start;
    width: min(1040px, 100%);
    grid-template-columns: minmax(0, 1.1fr) minmax(330px, 360px);
    gap: clamp(58px, 9vw, 132px);
}
.login-intro h1 {
    max-width: 620px;
    font-size: clamp(2.3rem, 4.4vw, 3.65rem);
    line-height: 1.02;
}
.login-intro > p {
    max-width: 520px;
    font-size: .89rem;
    line-height: 1.62;
}
.login-features {
    margin-top: 18px;
    gap: 7px;
}
.login-plans {
    max-width: 520px;
    gap: 10px;
    margin-top: 20px;
}
.login-plan {
    min-height: 112px;
    padding: 13px 12px;
}
.login-plan strong {
    font-size: .86rem;
}
.login-plan span,
.login-plan small {
    margin-top: 4px;
    font-size: .68rem;
}
.login-plan b {
    margin-top: 10px;
    font-size: 1rem;
}
.whatsapp-float {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 70;
    min-height: 48px;
    padding: 0 18px 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: #168a5a;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    box-shadow: 0 16px 30px rgba(18, 112, 76, .24);
    text-decoration: none;
    font-weight: 850;
    font-size: .8rem;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.whatsapp-float:hover {
    color: #fff;
    background: #12764d;
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(18, 112, 76, .3);
}
.whatsapp-float span {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, .12);
    border-radius: 50%;
}
.whatsapp-float svg {
    width: 23px;
    height: 23px;
    display: block;
}
.dashboard-support-float {
    right: 24px;
    bottom: 24px;
}

/* Dashboard gerencial NF-e */
.nfe-management-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0 20px}
.nfe-manager-panel{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:var(--shadow-sm);overflow:hidden}
.nfe-manager-wide{grid-column:1/-1}
.nfe-manager-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.nfe-manager-head h2{margin:2px 0 0;font-size:1.05rem;color:var(--ink)}
.nfe-manager-head strong{font-size:.9rem;color:var(--cyan-dark);background:var(--cyan-soft);border-radius:999px;padding:7px 10px;white-space:nowrap}
.nfe-manager-head.compact{margin-bottom:10px}
.nfe-chart-bars{height:170px;display:grid;grid-template-columns:repeat(6,1fr);gap:10px;align-items:end;border-bottom:1px solid var(--line);padding:8px 2px 0}
.nfe-chart-bar{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;min-width:0}
.nfe-chart-bar span{display:block;width:100%;max-width:30px;min-height:8px;background:linear-gradient(180deg,var(--cyan),var(--navy));border-radius:7px 7px 0 0}
.nfe-chart-bar small{font-size:.68rem;color:var(--muted)}
.nfe-chart-bar b{font-size:.75rem;color:var(--ink)}
.nfe-manager-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.nfe-manager-kpis div{background:var(--paper);border-radius:10px;padding:10px}
.nfe-manager-kpis small{display:block;color:var(--muted);font-size:.7rem;font-weight:700}
.nfe-manager-kpis strong{display:block;margin-top:3px;color:var(--ink);font-size:.95rem}
.nfe-ranked-list,.nfe-pendency-list,.nfe-alert-list{display:grid;gap:9px}
.nfe-ranked-item{display:grid;gap:6px}
.nfe-ranked-item div{display:flex;justify-content:space-between;gap:10px;font-size:.78rem}
.nfe-ranked-item strong{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nfe-ranked-item span{color:var(--muted);white-space:nowrap}
.nfe-ranked-item i{display:block;height:7px;border-radius:99px;background:linear-gradient(90deg,var(--cyan),var(--green))}
.nfe-pendency-list a,.nfe-alert-list a{display:block;text-decoration:none;background:var(--paper);border:1px solid transparent;border-radius:10px;padding:10px;transition:.18s}
.nfe-pendency-list a:hover,.nfe-alert-list a:hover{border-color:var(--cyan);background:#fff}
.nfe-pendency-list strong,.nfe-alert-list span{display:block;color:var(--ink);font-size:.78rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nfe-pendency-list span{display:block;color:var(--muted);font-size:.72rem;margin-top:2px}
.nfe-alert-list b{display:inline-block;color:#991b1b;background:#fef2f2;border-radius:999px;padding:3px 7px;font-size:.66rem;margin-bottom:5px}
.nfe-empty-mini{margin:0;color:var(--muted);font-size:.78rem}
.nfe-report-box{display:grid;gap:8px;color:var(--ink-soft);font-size:.78rem}
.nfe-report-box p{margin:0;color:var(--ink);font-weight:700}
.nfe-report-box code{display:block;white-space:normal;word-break:break-all;background:var(--paper);border:1px solid var(--line);border-radius:8px;padding:8px;color:var(--cyan-dark);font-size:.72rem}
.nfe-report-box span{color:var(--muted);font-size:.72rem}
.nfe-tag-form{display:grid;grid-template-columns:minmax(120px,1fr);gap:6px;min-width:170px}
.nfe-tag-form select,.nfe-tag-form input{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:8px;padding:7px 8px;font-size:.74rem;background:#fff;color:var(--ink)}
.nfe-tag-form .mini-button{justify-self:start}
.nfe-history summary{cursor:pointer;color:var(--cyan-dark);font-weight:800;font-size:.76rem}
.nfe-history div{position:absolute;z-index:20;width:min(320px,80vw);margin-top:8px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow-lg)}
.nfe-history p{margin:0 0 8px;display:grid;gap:2px}
.nfe-history p:last-child{margin-bottom:0}
.nfe-history strong{font-size:.72rem;color:var(--ink)}
.nfe-history span,.nfe-history small{font-size:.68rem;color:var(--muted)}
tr:target{outline:2px solid var(--cyan);outline-offset:-2px;background:var(--cyan-soft)}

/* Tela DF-e SEFAZ */
.dfe-page .dashboard-main{padding-top:18px}
.dfe-page .hero{margin-bottom:12px;padding-bottom:14px}
.dfe-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:16px}
.dfe-hero h1{font-size:clamp(1.55rem,2.4vw,2.25rem);margin-bottom:5px}
.dfe-hero .subtitle{max-width:760px;font-size:.88rem}
.dfe-hero-actions{justify-content:flex-end;flex-wrap:wrap}
.dfe-company-card{margin-bottom:12px;overflow:visible}
.dfe-company-form{display:flex;align-items:end;gap:10px;padding:12px 14px;border-bottom:0;border-radius:12px}
.dfe-company-grid{grid-template-columns:minmax(260px,420px);width:min(100%,420px)}
.dfe-management-grid{gap:12px;margin:12px 0 16px}
.dfe-management-grid .nfe-manager-panel{overflow:visible}
.dfe-config-panel{padding:12px}
.dfe-config-panel .nfe-manager-head{margin-bottom:8px}
.dfe-config-form{display:grid;grid-template-columns:1fr;gap:10px;padding:0;border:0;background:transparent}
.dfe-config-grid{grid-template-columns:1.15fr 1fr .42fr .82fr .72fr 1fr 1fr 1.15fr;gap:8px;align-items:end}
.dfe-field{min-width:0;position:relative}
.dfe-field label,.dfe-file-field>label:first-child{display:block;margin:0 0 4px;color:#52637a;font-size:.64rem;font-weight:800}
.dfe-field input,.dfe-select-trigger,.dfe-file-control{width:100%;height:36px;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--ink);font-size:.76rem;font-weight:750}
.dfe-field input{padding:6px 10px;box-shadow:0 1px 0 rgba(15,23,42,.03)}
.dfe-field input:focus,.dfe-select-trigger:focus-visible,.dfe-file-control:focus-visible{outline:2px solid rgba(8,145,178,.18);border-color:var(--cyan)}
.dfe-field-uf input{text-transform:uppercase;text-align:center}
.dfe-field-validity input{color:var(--muted);font-size:.72rem}
.dfe-select{position:relative;min-width:0}
.dfe-select select{display:none}
.dfe-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 34px 0 11px;cursor:pointer;text-align:left;position:relative;overflow:hidden}
.dfe-select-trigger span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dfe-select-trigger::after{content:"";position:absolute;right:12px;top:50%;width:8px;height:8px;border-right:2px solid var(--cyan-dark);border-bottom:2px solid var(--cyan-dark);transform:translateY(-65%) rotate(45deg);transition:.16s}
.dfe-select.is-open .dfe-select-trigger::after{transform:translateY(-35%) rotate(225deg)}
.dfe-select-menu{position:absolute;z-index:80;top:calc(100% + 7px);left:0;width:max(100%,min(420px,calc(100vw - 36px)));max-height:min(280px,48vh);overflow:auto;padding:6px;background:#fff;border:1px solid rgba(15,23,42,.12);border-radius:12px;box-shadow:0 20px 45px rgba(15,23,42,.18)}
.dfe-select-small .dfe-select-menu{width:max(100%,180px)}
.dfe-select-menu button{width:100%;display:block;border:0;background:transparent;color:var(--ink);text-align:left;border-radius:8px;padding:8px 10px;font-size:.76rem;font-weight:750;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dfe-select-menu button:hover,.dfe-select-menu button[aria-selected=true]{background:var(--cyan-soft);color:var(--cyan-dark)}
.dfe-file-input{position:absolute;inline-size:1px;block-size:1px;opacity:0;pointer-events:none}
.dfe-file-control{display:flex!important;align-items:center;justify-content:center;margin:0!important;padding:0 11px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:linear-gradient(180deg,#fff,#f8fafc)}
.dfe-file-control span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dfe-file-control::before{content:"";width:13px;height:13px;margin-right:7px;border:2px solid var(--cyan-dark);border-radius:3px;box-shadow:inset 0 -3px 0 rgba(8,145,178,.12)}
.dfe-inline-options{display:flex;align-items:stretch;justify-content:flex-start;gap:8px;flex-wrap:wrap}
.dfe-option-group{display:flex;align-items:center;gap:8px;min-height:34px;padding:6px 8px;background:#f8fafc;border:1px solid #e1e8f0;border-radius:9px}
.dfe-option-group>span{color:#52637a;font-size:.61rem;font-weight:850;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.dfe-inline-options .compact-check{margin:0;color:var(--ink);font-size:.72rem;font-weight:800;white-space:nowrap}
.dfe-inline-options .compact-check input{margin-right:4px}
.dfe-inline-options .button{height:36px;padding:0 14px;margin-left:auto;white-space:nowrap}
.dfe-actions-panel .dfe-action-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:center;justify-content:start;max-width:100%}
.dfe-actions-panel .button{width:100%;min-height:34px;padding:0 10px;justify-content:center;border-radius:9px;font-size:.72rem;line-height:1.15;white-space:normal;text-align:center}
.dfe-actions-panel .nfe-report-box{margin-top:12px}
.dfe-metrics{margin-bottom:12px}
.dfe-metrics .metric{min-height:74px;padding:13px}
@media(max-width:860px){
    .nfe-management-grid{grid-template-columns:1fr}
    .nfe-manager-kpis{grid-template-columns:1fr}
    .nfe-chart-bars{height:140px}
    .dfe-hero{align-items:flex-start;flex-direction:column}
    .dfe-config-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
    .dfe-field-validity,.dfe-file-field{grid-column:auto}
    .dfe-company-form{display:grid}
    .dfe-inline-options{display:grid;grid-template-columns:1fr}
    .dfe-inline-options .button{width:100%;margin-left:0}
    .dfe-option-group{align-items:flex-start;flex-wrap:wrap}
    .dfe-option-group>span{width:100%}
}
@media(max-width:560px){
    .dfe-actions-panel .dfe-action-buttons{grid-template-columns:1fr}
    .dfe-actions-panel .button{width:100%}
}
@media (max-height: 760px) and (min-width: 901px) {
    .login-page {
        padding-top: 26px;
        padding-bottom: 104px;
    }
    .login-intro h1 {
        font-size: clamp(2.05rem, 3.65vw, 3.15rem);
    }
    .login-eyebrow {
        margin-bottom: 12px;
    }
    .login-plans {
        margin-top: 16px;
    }
    .login-plan {
        min-height: 104px;
    }
}
@media (max-width: 680px) {
    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        min-height: 46px;
        padding-right: 14px;
    }
}

/* Rodape sempre no fim da pagina, sem sobrepor conteudo */
body:not(.login-body):not(.saas-body) {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}
body:not(.login-body):not(.saas-body) > main {
    flex: 1 0 auto;
}
.saas-body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}
.saas-body .saas-container {
    flex: 1 0 auto;
}
.system-footer {
    flex-shrink: 0;
    margin-top: auto;
}
.login-body {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: #f2f7fb;
}
.login-page,
.client-login-page {
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 24px;
}
.login-shell,
.client-login-shell,
.reset-password-card {
    flex: 0 0 auto;
}
.login-footer {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 980px);
    margin: auto auto 0;
    padding: 28px 16px 0;
    flex: 0 0 auto;
    z-index: 1;
}

/* Login do cliente: animacao exclusiva, suave e profissional */
.client-login-page {
    background:
        linear-gradient(135deg, rgba(5, 28, 46, .98), rgba(8, 77, 88, .88)),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: auto, 64px 64px, 64px 64px;
}
.client-login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(115deg, transparent 0%, rgba(215, 250, 252, .08) 42%, rgba(215, 250, 252, .16) 50%, rgba(215, 250, 252, .08) 58%, transparent 100%);
    transform: translateX(-45%);
    animation: client-login-sheen 8s ease-in-out infinite;
}
.client-login-page::after {
    content: none;
}
.client-login-shell {
    animation: client-login-settle .68s cubic-bezier(.2,.8,.2,1) both;
}
.client-login-copy {
    animation: none;
}
.client-login-card {
    border: 1px solid rgba(188, 233, 236, .75);
    background: rgba(248, 253, 253, .97);
    background-size: auto;
    animation: client-login-card-soft .72s .08s cubic-bezier(.2,.8,.2,1) both;
}
.client-login-card::after {
    content: "";
    inset: -1px;
    opacity: .32;
    filter: blur(14px);
    background: linear-gradient(135deg, rgba(125, 211, 216, .18), rgba(255,255,255,0), rgba(92, 184, 154, .13));
    animation: none;
}
.client-login-features span {
    animation: client-login-feature-in .5s cubic-bezier(.2,.8,.2,1) both;
}
.client-login-features span:nth-child(1) { animation-delay: .08s; }
.client-login-features span:nth-child(2) { animation-delay: .14s; }
.client-login-features span:nth-child(3) { animation-delay: .2s; }
.client-login-features span:nth-child(4) { animation-delay: .26s; }
.client-login-features span:nth-child(5) { animation-delay: .32s; }
@keyframes client-login-sheen {
    0%, 22% { opacity: .35; transform: translateX(-48%); }
    52% { opacity: .85; transform: translateX(12%); }
    100% { opacity: .35; transform: translateX(48%); }
}
@keyframes client-login-settle {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes client-login-card-soft {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes client-login-feature-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .client-login-page::before,
    .client-login-shell,
    .client-login-card,
    .client-login-features span {
        animation: none;
    }
}

/* Ajustes finos de composicao dos logins em desktop */
@media (min-width: 901px) {
    .login-page {
        padding-top: clamp(68px, 9vh, 96px);
        padding-left: clamp(32px, 4vw, 64px);
        padding-right: clamp(32px, 4vw, 64px);
    }
    .login-shell {
        width: min(1180px, 100%);
        grid-template-columns: minmax(600px, 1fr) minmax(330px, 360px);
        gap: clamp(96px, 11vw, 154px);
        justify-content: center;
        transform: none;
        align-items: start;
    }
    .login-intro {
        padding-top: 4px;
    }
    .login-intro h1 {
        max-width: 730px;
        font-size: clamp(2.55rem, 3.45vw, 3.15rem);
        line-height: 1.04;
    }
    .login-intro > p {
        max-width: 590px;
    }
    .login-card:not(.client-login-card) {
        margin-top: clamp(46px, 6vh, 72px);
        justify-self: end;
    }

    .client-login-page {
        padding-top: clamp(76px, 10vh, 112px);
    }
    .client-login-shell {
        width: min(980px, 100%);
        grid-template-columns: minmax(0, .9fr) minmax(320px, 360px);
        gap: clamp(68px, 8vw, 108px);
        align-items: start;
        transform: translateX(34px);
    }
    .client-login-copy {
        padding-top: 14px;
    }
    .client-login-card {
        margin-top: clamp(52px, 8vh, 86px);
        margin-left: 42px;
        justify-self: end;
    }
}

/* Responsividade geral: evita estouros horizontais nas telas administrativas e no painel. */
* {
    box-sizing: border-box;
}
img,
svg,
video,
canvas {
    max-width: 100%;
}
.table-wrap,
.usage-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap table,
.usage-table-wrap table {
    min-width: 760px;
}
.records-card,
.card,
.modal-panel,
.settings-card,
.nfe-manager-panel,
.client-plan-strip,
.billing-card {
    max-width: 100%;
}
input,
select,
textarea,
button {
    max-width: 100%;
}
.metric-link {
    color: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.metric-link:hover {
    border-color: rgba(0, 140, 153, .35);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}
.metric-link em {
    color: var(--cyan-dark, #008c99);
    display: block;
    font-size: .66rem;
    font-style: normal;
    font-weight: 850;
    margin-top: 4px;
    text-transform: uppercase;
}
.resolution-banner {
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #f7fbfd 100%);
    border-bottom: 1px solid var(--line, #d9e3ef);
    border-top: 1px solid rgba(0, 140, 153, .12);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px 20px;
}
.resolution-banner strong {
    color: var(--ink, #071f3b);
    display: block;
    font-size: 1.05rem;
    margin-top: 4px;
}
.resolution-banner p {
    color: var(--muted, #6b7c93);
    font-size: .86rem;
    line-height: 1.45;
    margin: 4px 0 0;
}
tr.needs-resolution td {
    border-bottom-color: transparent;
}
.resolve-row td {
    background: #f7fbfd;
    border-bottom: 1px solid var(--line, #d9e3ef);
    padding: 0 16px 16px;
}
.resolve-note-form {
    align-items: end;
    background: #fff;
    border: 1px solid rgba(155, 174, 197, .55);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
    display: grid;
    gap: 10px 12px;
    grid-template-columns: minmax(170px, 1.25fr) minmax(130px, .85fr) minmax(160px, 1.1fr) minmax(120px, .75fr) minmax(120px, .75fr) auto;
    padding: 14px;
}
.resolve-note-form label {
    color: var(--ink-soft, #5e6f86);
    display: grid;
    font-size: .64rem;
    font-weight: 850;
    gap: 6px;
    text-transform: uppercase;
}
.resolve-note-form input {
    border: 1px solid var(--line, #d9e3ef);
    border-radius: 7px;
    color: var(--ink, #071f3b);
    font: inherit;
    font-size: .82rem;
    font-weight: 750;
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
}
.resolve-note-form input:focus {
    border-color: var(--cyan-dark, #008c99);
    box-shadow: 0 0 0 3px rgba(0, 140, 153, .12);
    outline: none;
}
.resolve-submit {
    border-radius: 8px;
    justify-self: end;
    min-height: 38px;
    min-width: 104px;
    padding-inline: 14px;
    white-space: nowrap;
}
.rh-fields-hero {
    align-items: end;
    margin-bottom: 14px;
    min-height: 0;
    padding-bottom: 10px;
    padding-top: 8px;
}
.rh-config-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
}
.rh-config-card,
.rh-preview-card {
    overflow: hidden;
}
.rh-config-head {
    align-items: center;
    border-bottom: 1px solid var(--line, #d9e3ef);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px 16px;
}
.rh-config-head h2,
.rh-preview-card h2 {
    color: var(--ink, #071f3b);
    font-size: .98rem;
    margin: 2px 0 0;
}
.rh-scope-pill {
    border: 1px solid rgba(0, 140, 153, .25);
    border-radius: 999px;
    color: var(--cyan-dark, #008c99);
    font-size: .68rem;
    font-weight: 850;
    padding: 6px 9px;
    text-transform: uppercase;
    white-space: nowrap;
}
.rh-scope-pill.global {
    border-color: rgba(107, 124, 147, .28);
    color: var(--muted, #6b7c93);
}
.rh-fields-form {
    padding: 14px 16px 16px;
}
.rh-fields-form fieldset {
    border: 0;
    margin: 0 0 14px;
    padding: 0;
}
.rh-fields-form legend {
    align-items: center;
    color: var(--ink, #071f3b);
    display: flex;
    font-size: .78rem;
    font-weight: 900;
    gap: 7px;
    margin-bottom: 9px;
}
.rh-fields-form legend span {
    background: #e8f8fb;
    border-radius: 7px;
    color: var(--cyan-dark, #008c99);
    display: grid;
    height: 23px;
    place-items: center;
    width: 23px;
}
.rh-core-grid {
    display: grid;
    gap: 8px 10px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(132px, .55fr);
}
.rh-core-card {
    align-items: center;
    background: #fbfdff;
    border: 1px solid var(--line, #d9e3ef);
    border-radius: 7px;
    display: grid;
    gap: 8px;
    grid-column: span 2;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 58px;
    padding: 9px 10px;
}
.rh-core-card input,
.rh-required-toggle input {
    accent-color: var(--cyan-dark, #008c99);
}
.rh-core-card strong {
    color: var(--ink, #071f3b);
    display: block;
    font-size: .82rem;
}
.rh-core-card small {
    color: var(--muted, #6b7c93);
    display: block;
    font-size: .67rem;
    line-height: 1.25;
    margin-top: 1px;
}
.rh-core-card em {
    display: none;
    color: var(--cyan-dark, #008c99);
    font-size: .66rem;
    font-style: normal;
    font-weight: 850;
    text-transform: uppercase;
}
.rh-required-toggle {
    align-items: center;
    align-self: stretch;
    background: #fff;
    border: 1px dashed rgba(155, 174, 197, .75);
    border-radius: 7px;
    color: var(--ink-soft, #5e6f86);
    display: flex;
    font-size: .68rem;
    font-weight: 800;
    gap: 6px;
    min-height: 32px;
    margin: 0;
    padding: 7px 9px;
}
.rh-extra-table {
    border: 1px solid var(--line, #d9e3ef);
    border-radius: 8px;
    overflow: hidden;
}
.rh-extra-head,
.rh-extra-row {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(180px, 1.25fr) minmax(110px, .5fr) minmax(160px, .8fr);
}
.rh-extra-head {
    background: #f3f7fb;
    color: var(--muted, #6b7c93);
    font-size: .66rem;
    font-weight: 900;
    padding: 8px 10px;
    text-transform: uppercase;
}
.rh-extra-row {
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--line, #d9e3ef);
    padding: 7px 10px;
}
.rh-extra-row input,
.rh-extra-row select {
    border: 1px solid var(--line, #d9e3ef);
    border-radius: 6px;
    color: var(--ink, #071f3b);
    font: inherit;
    font-size: .79rem;
    min-height: 32px;
    padding: 6px 8px;
}
.rh-extra-row span {
    color: var(--muted, #6b7c93);
    font-size: .68rem;
    line-height: 1.25;
}
.rh-fields-actions {
    border-top: 1px solid var(--line, #d9e3ef);
    margin: 0 -16px -16px;
    padding: 11px 16px;
}
.rh-preview-card {
    align-self: start;
    padding: 16px;
}
.rh-preview-card p {
    color: var(--muted, #6b7c93);
    font-size: .78rem;
    line-height: 1.42;
}
.rh-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px 0;
}
.rh-preview-list span {
    background: #eef8fa;
    border: 1px solid rgba(0, 140, 153, .18);
    border-radius: 999px;
    color: var(--ink, #071f3b);
    font-size: .68rem;
    font-weight: 850;
    padding: 5px 8px;
}
.rh-safe-note {
    background: #f7fbfd;
    border-left: 3px solid var(--cyan-dark, #008c99);
    border-radius: 6px;
    margin-bottom: 0;
    padding: 8px 10px;
}
.note-extra-fields {
    margin-top: 7px;
}
.note-extra-fields summary {
    color: var(--cyan-dark, #008c99);
    cursor: pointer;
    font-size: .68rem;
    font-weight: 850;
}
.note-extra-fields span {
    color: var(--ink-soft, #5e6f86);
    display: block;
    font-size: .7rem;
    line-height: 1.35;
    margin-top: 4px;
    max-width: 220px;
    white-space: normal;
}
@media (max-width: 900px) {
    .topbar {
        position: static;
    }
    .brand {
        max-width: 100%;
    }
    .brand-logo-img,
    .brand-logo-img-large,
    .dashboard-logo-img {
        max-width: min(220px, 100%);
        object-fit: contain;
    }
    .nav {
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
    }
    .nav a,
    .nav-logout,
    .nav-action {
        flex: 0 0 auto;
        min-height: 34px;
        white-space: nowrap;
    }
    .nav-menu {
        flex: 0 0 auto;
    }
    .nav-submenu {
        right: auto;
        left: 0;
    }
    .dashboard-main {
        padding-top: 22px;
    }
    .nfe-manager-grid,
    .settings-grid,
    .form-grid,
    .nfe-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .resolution-banner {
        align-items: stretch;
        flex-direction: column;
    }
    .resolve-note-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .resolve-submit {
        grid-column: 1 / -1;
        justify-self: stretch;
    }
    .rh-config-layout,
    .rh-core-grid {
        grid-template-columns: 1fr;
    }
    .rh-core-card {
        grid-column: auto;
    }
}
@media (max-width: 680px) {
    body {
        overflow-x: hidden;
    }
    .hero h1 {
        font-size: clamp(1.55rem, 9vw, 2.1rem);
        line-height: 1.08;
    }
    .hero .subtitle {
        font-size: .88rem;
    }
    .metrics,
    .nfe-cards,
    .nfe-manager-grid,
    .settings-grid,
    .form-grid,
    .nfe-filter-grid,
    .billing-card-row,
    .client-plan-billing,
    .client-module-grid {
        grid-template-columns: 1fr;
    }
    .records-head,
    .records-toolbar,
    .pagination-bar,
    .result-actions,
    .modal-footer {
        gap: 8px;
    }
    .records-head,
    .section-row {
        align-items: stretch;
        flex-direction: column;
    }
    .search-form input,
    .search-form button,
    .records-toolbar .button,
    .modal-footer .button,
    .modal-footer .btn,
    .export-button {
        width: 100%;
    }
    .nfe-filter-actions,
    .access-actions,
    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .nfe-filter-actions .button,
    .access-actions .button,
    .access-actions button,
    .result-actions a,
    .result-actions button {
        width: 100%;
        justify-content: center;
    }
    .table-wrap table,
    .usage-table-wrap table {
        min-width: 680px;
    }
    .resolve-note-form {
        grid-template-columns: 1fr;
    }
    .rh-extra-head {
        display: none;
    }
    .rh-extra-row {
        grid-template-columns: 1fr;
    }
    .rh-config-head,
    .rh-fields-hero {
        align-items: stretch;
        flex-direction: column;
    }
    .modal-panel {
        width: min(100%, 560px);
    }
    .welcome-splash,
    .logout-overlay {
        padding: 12px;
    }
    .ws-card {
        width: min(100%, 380px);
    }
}
@media (max-width: 420px) {
    .shell {
        width: min(100% - 16px, 1240px);
    }
    .nav a,
    .nav-logout,
    .nav-action {
        font-size: .7rem;
        padding-inline: 7px;
    }
    .card,
    .records-card,
    .nfe-manager-panel {
        border-radius: 10px;
    }
    .records-head,
    .records-toolbar,
    .pagination-bar {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Auditoria mobile: garante que logins e paineis nunca renderizem como desktop cortado. */
@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .login-body {
        min-height: 100svh;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .login-page,
    .client-login-page {
        width: 100%;
        min-height: 100svh;
        align-items: center;
        justify-content: flex-start;
        padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
        overflow-x: hidden;
    }
    .login-page::before,
    .login-page::after,
    .client-login-page::before,
    .client-login-page::after,
    .login-orb {
        content: none;
        display: none;
    }
    .login-shell,
    .client-login-shell {
        width: 100%;
        max-width: 420px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        justify-items: stretch;
        align-items: start;
        transform: none;
        margin: 0 auto;
    }
    .login-intro {
        display: block;
        width: 100%;
        text-align: left;
    }
    .login-eyebrow {
        margin-bottom: 9px;
        font-size: .56rem;
    }
    .login-intro h1 {
        max-width: 100%;
        margin-bottom: 9px;
        font-size: clamp(1.45rem, 7.2vw, 1.95rem);
        line-height: 1.08;
        letter-spacing: 0;
    }
    .login-intro > p {
        max-width: 100%;
        font-size: .78rem;
        line-height: 1.45;
    }
    .login-features {
        display: none;
    }
    .login-plans {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 12px;
    }
    .login-plan {
        min-height: 74px;
        padding: 8px;
        border-radius: 8px;
    }
    .login-plan strong {
        font-size: .68rem;
    }
    .login-plan span,
    .login-plan small {
        font-size: .55rem;
        line-height: 1.2;
        margin-top: 2px;
    }
    .login-plan b {
        margin-top: 6px;
        font-size: .72rem;
    }
    .login-card,
    .client-login-card {
        width: 100%;
        max-width: 420px;
        justify-self: stretch;
        margin: 0;
        padding: 18px;
        border-radius: 13px;
        animation: none;
    }
    .login-card::after,
    .client-login-card::after {
        content: none;
        display: none;
    }
    .login-card .login-brand,
    .client-login-card .login-brand {
        margin-bottom: 12px;
    }
    .login-card .login-heading h2,
    .client-login-card .login-heading h2 {
        font-size: 1.18rem;
        line-height: 1.12;
    }
    .login-card .login-heading p,
    .client-login-card .login-heading p {
        margin-bottom: 8px;
        font-size: .76rem;
        line-height: 1.35;
    }
    .login-card .login-form label,
    .client-login-card .login-form label {
        margin: 8px 0 4px;
    }
    .login-card .input-wrap input,
    .client-login-card .input-wrap input {
        min-height: 36px;
        font-size: 16px;
    }
    .login-actions,
    .login-card .login-button,
    .client-login-card .login-button {
        width: 100%;
    }
    .login-actions {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .client-login-copy {
        display: none;
    }
    .login-footer,
    .system-footer {
        width: 100%;
        padding: 14px 10px 0;
        font-size: .58rem;
        line-height: 1.35;
    }
    .shell {
        width: min(100% - 16px, 1240px);
    }
    .topbar {
        position: static;
    }
    .topbar-inner {
        min-height: auto;
        align-items: stretch;
        gap: 8px;
        padding: 10px 0;
    }
    .brand {
        max-width: 100%;
    }
    .nav {
        width: 100%;
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 7px 0 2px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .nav a,
    .nav-action,
    .nav-logout {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 0 9px;
        white-space: nowrap;
    }
    .dashboard-main {
        padding-top: 16px;
    }
    .hero {
        gap: 12px;
        margin-bottom: 14px;
    }
    .hero h1 {
        font-size: clamp(1.42rem, 8vw, 2rem);
        line-height: 1.08;
    }
    .hero .subtitle {
        font-size: .82rem;
        line-height: 1.45;
    }
    .metrics {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .metric {
        min-height: 76px;
        padding: 12px;
    }
    .records-card,
    .card,
    .nfe-manager-panel,
    .rh-config-card,
    .rh-preview-card {
        border-radius: 9px;
    }
    .records-head,
    .records-toolbar,
    .pagination-bar {
        padding-left: 12px;
        padding-right: 12px;
    }
    .search-form,
    .nfe-filter-actions,
    .modal-footer,
    .rh-fields-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .search-form button,
    .export-button,
    .button,
    .btn,
    .rh-fields-actions .button {
        width: 100%;
        justify-content: center;
    }
    .table-wrap,
    .usage-table-wrap {
        max-width: 100%;
        overflow-x: auto;
    }
    .table-wrap table,
    .usage-table-wrap table {
        min-width: 720px;
    }
    .modal-backdrop {
        padding: 10px;
    }
    .modal-panel {
        width: min(100%, 560px);
        max-height: 92svh;
    }
    .rh-config-layout {
        grid-template-columns: 1fr;
    }
    .rh-core-grid {
        grid-template-columns: 1fr;
    }
    .rh-core-card {
        grid-column: auto;
    }
    .rh-extra-head {
        display: none;
    }
    .rh-extra-row {
        grid-template-columns: 1fr;
    }
}

/* Auditoria mobile e navegacao */
.nav-menu.is-open .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.nav-menu-trigger {
    appearance: none;
}
.input-icon {
    width: 18px;
    height: 18px;
    left: 13px;
    top: 50%;
    border: 0;
    border-radius: 0;
    transform: translateY(-50%);
}
.input-icon::before,
.input-icon::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.input-icon::before {
    width: 8px;
    height: 8px;
    left: 5px;
    top: 2px;
    border: 1.8px solid #7e8fa3;
    border-radius: 50%;
}
.input-icon::after {
    width: 14px;
    height: 7px;
    left: 2px;
    top: 11px;
    border: 1.8px solid #7e8fa3;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
}
.input-icon.lock {
    top: 50%;
    height: 18px;
    border: 0;
    border-radius: 0;
}
.input-icon.lock::before {
    width: 8px;
    height: 8px;
    left: 5px;
    top: 1px;
    border: 1.8px solid #7e8fa3;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
}
.input-icon.lock::after {
    width: 15px;
    height: 10px;
    left: 1.5px;
    top: 8px;
    border: 1.8px solid #7e8fa3;
    border-radius: 4px;
    background:
        radial-gradient(circle at center 45%, #7e8fa3 0 1.5px, transparent 1.7px),
        linear-gradient(#7e8fa3, #7e8fa3) center 60% / 1.5px 4px no-repeat;
}
.input-wrap:focus-within .input-icon::before,
.input-wrap:focus-within .input-icon::after {
    border-color: var(--cyan-dark);
}
.input-wrap:focus-within .input-icon.lock::after {
    background:
        radial-gradient(circle at center 45%, var(--cyan-dark) 0 1.5px, transparent 1.7px),
        linear-gradient(var(--cyan-dark), var(--cyan-dark)) center 60% / 1.5px 4px no-repeat;
}
.login-field-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 1;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #74869c;
    pointer-events: none;
    transform: translateY(-50%);
}
.login-field-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.input-wrap:focus-within .login-field-icon {
    color: var(--cyan-dark);
}

@media (max-width: 760px) {
    .topbar {
        position: sticky;
    }
    .topbar-inner {
        align-items: stretch;
    }
    .nav {
        scrollbar-width: thin;
    }
    .nav-menu {
        position: static;
        flex: 0 0 auto;
    }
    .nav-submenu {
        min-width: min(92vw, 280px);
        max-width: calc(100vw - 24px);
        top: auto;
        right: 8px;
        left: 8px;
        position: absolute;
        margin-top: 6px;
    }
    .nav-menu.is-open .nav-submenu,
    .nav-menu:focus-within .nav-submenu {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .nav .nav-home-link {
        order: -1;
    }
    .dashboard-main,
    .topbar + main:not(.dashboard-main) {
        padding-top: 18px;
    }
    .hero {
        align-items: stretch;
    }
    .hero > div,
    .records-head > div,
    .card,
    .settings {
        min-width: 0;
    }
    .settings dl,
    .settings-grid,
    .settings-grid-small,
    .form-grid,
    .grid-form {
        grid-template-columns: 1fr;
    }
    .card,
    .records-card,
    .settings,
    .nfe-manager-panel {
        overflow-wrap: anywhere;
    }
    .modal-footer,
    .saas-header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .modal-footer .button,
    .saas-header-actions .btn,
    .nav-home-link,
    .hero .button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-card,
    .client-login-card {
        padding: 18px 16px;
    }
    .input-wrap input {
        padding-left: 42px;
    }
    .login-client-shortcut,
    .login-actions .button {
        white-space: normal;
    }
}

/* Ajustes compactos do dashboard do admin cliente */
.client-dashboard .client-plan-strip {
    width: min(100%, 760px);
}
.client-dashboard .client-plan-billing {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(190px, 1.08fr) minmax(170px, .92fr) minmax(160px, .82fr);
    gap: 8px;
}
.client-dashboard .client-plan-billing .billing-card {
    flex: none;
    max-width: none;
    min-height: 86px;
    padding: 8px 10px;
}
.client-dashboard .billing-expiry-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}
.client-dashboard .billing-expiry-icon svg {
    width: 17px;
    height: 17px;
}
.client-dashboard .billing-expiry-info small,
.client-dashboard .billing-expiry-value small {
    font-size: .56rem;
}
.client-dashboard .billing-expiry-info strong,
.client-dashboard .billing-expiry-value strong {
    font-size: .78rem;
}
.client-dashboard .billing-days-badge {
    padding: 1px 5px;
    font-size: .55rem;
}
.client-dashboard .billing-pix-initial,
.client-dashboard .billing-upgrade-main {
    gap: 8px;
}
.client-dashboard .billing-pix-btn,
.client-dashboard .billing-upgrade-button {
    min-height: 28px;
    padding: 0 9px;
    font-size: .68rem;
}
.client-dashboard .billing-upgrade-card {
    gap: 8px;
}
.client-backup-settings {
    display: grid;
    gap: 12px;
    margin: 0 18px 18px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
}
.client-backup-head h3 {
    margin: 4px 0 4px;
    font-size: .95rem;
}
.client-backup-head p {
    margin: 0;
    color: var(--muted);
    font-size: .72rem;
}
.client-backup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.client-backup-grid label {
    display: grid;
    gap: 5px;
}
.client-backup-grid input {
    min-height: 34px;
    padding: 7px 9px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #d5dfe9;
    border-radius: 8px;
}
.client-backup-save {
    width: fit-content;
    min-height: 32px;
    padding: 0 12px;
    font-size: .72rem;
}
@media (max-width: 980px) {
    .client-dashboard .client-plan-strip {
        width: 100%;
    }
    .client-dashboard .client-plan-billing {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .client-backup-grid {
        grid-template-columns: 1fr;
    }
    .client-backup-save {
        width: 100%;
    }
}

/* Refinamento final do painel do admin cliente */
.client-dashboard {
    grid-template-columns: minmax(0, 620px) minmax(280px, 1fr);
    gap: 12px;
    align-items: start;
}

.client-dashboard .client-plan-strip {
    width: 100%;
    max-width: 620px;
    padding: 14px 16px;
    border-radius: 8px;
}

.client-dashboard .client-profile-summary {
    gap: 12px;
}

.client-dashboard .client-avatar {
    width: 44px;
    height: 44px;
    font-size: .78rem;
}

.client-dashboard .client-profile-summary h2 {
    font-size: 1rem;
}

.client-dashboard .client-plan-billing {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) minmax(0, .9fr);
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.client-dashboard .client-plan-billing .billing-card {
    min-height: 72px;
    padding: 8px 9px;
    border-radius: 7px;
    align-content: center;
    overflow: hidden;
}

.client-dashboard .billing-expiry-card {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 7px;
}

.client-dashboard .billing-expiry-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
}

.client-dashboard .billing-expiry-icon svg {
    width: 15px;
    height: 15px;
}

.client-dashboard .billing-expiry-info small,
.client-dashboard .billing-expiry-value small,
.client-dashboard .billing-plan-kicker,
.client-dashboard .billing-upgrade-kicker {
    font-size: .52rem;
    line-height: 1.15;
}

.client-dashboard .billing-expiry-info strong,
.client-dashboard .billing-expiry-value strong,
.client-dashboard .billing-plan-name,
.client-dashboard .billing-upgrade-title {
    font-size: .76rem;
    line-height: 1.2;
}

.client-dashboard .billing-days-badge {
    width: fit-content;
    padding: 1px 4px;
    font-size: .51rem;
}

.client-dashboard .billing-pix-initial {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.client-dashboard .billing-pix-icon,
.client-dashboard .billing-upgrade-icon {
    width: 22px;
    height: 22px;
}

.client-dashboard .billing-pix-icon svg,
.client-dashboard .billing-upgrade-icon svg {
    width: 15px;
    height: 15px;
}

.client-dashboard .billing-pix-btn,
.client-dashboard .billing-upgrade-button {
    min-height: 27px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: .65rem;
    white-space: nowrap;
}

.client-dashboard .billing-upgrade-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.client-dashboard .billing-upgrade-main {
    min-width: 0;
    gap: 7px;
}

.client-dashboard .client-module-grid {
    min-width: 0;
}

.client-profile-panel {
    width: min(560px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    border-radius: 10px;
}

.client-profile-head {
    padding: 18px 20px;
    gap: 12px;
}

.client-profile-head .client-avatar {
    width: 54px;
    height: 54px;
}

.client-profile-head h2 {
    font-size: 1.05rem;
}

.client-profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 16px 20px;
}

.client-profile-grid > div {
    min-height: 58px;
    padding: 10px 11px;
    border-radius: 8px;
}

.client-backup-settings {
    margin: 0 20px 20px;
    padding: 16px;
    gap: 14px;
    border-radius: 9px;
}

.client-backup-head .section-kicker {
    display: block;
    margin-bottom: 5px;
}

.client-backup-head h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.client-backup-head p {
    max-width: 46rem;
    font-size: .78rem;
    line-height: 1.45;
}

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

.client-backup-grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.client-backup-grid input {
    width: 100%;
    min-height: 38px;
    padding: 9px 10px;
    font-size: .82rem;
    border-radius: 8px;
    box-sizing: border-box;
}

.client-backup-save {
    justify-self: start;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 8px;
}

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

    .client-dashboard .client-plan-strip {
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    .client-dashboard .client-plan-billing,
    .client-profile-grid,
    .client-backup-grid {
        grid-template-columns: 1fr;
    }

    .client-dashboard .billing-expiry-card,
    .client-dashboard .billing-pix-initial,
    .client-dashboard .billing-upgrade-card {
        grid-template-columns: 24px minmax(0, 1fr);
    }

    .client-dashboard .billing-expiry-value,
    .client-dashboard .billing-pix-btn,
    .client-dashboard .billing-upgrade-button {
        grid-column: 2;
        justify-self: start;
    }
}

/* Upgrade e modal de planos mais compactos */
.client-dashboard .billing-upgrade-trigger {
    width: 100%;
    color: inherit;
    text-align: left;
    border: 1px solid var(--line);
    cursor: pointer;
    appearance: none;
}

.client-dashboard .billing-upgrade-trigger:hover,
.client-dashboard .billing-upgrade-trigger:focus-visible {
    border-color: rgba(0, 140, 153, .34);
    box-shadow: 0 12px 30px rgba(0, 140, 153, .12);
    transform: translateY(-1px);
}

.client-dashboard .billing-upgrade-trigger .billing-upgrade-main {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
}

.client-dashboard .billing-upgrade-trigger .billing-expiry-info {
    min-width: 0;
}

.plan-modal-panel {
    width: min(760px, calc(100vw - 28px));
    max-height: calc(100vh - 44px);
    border-radius: 10px;
}
.plan-suspended-panel {
    width: min(560px, calc(100vw - 28px));
    border-radius: 12px;
}
.plan-suspended-panel .modal-header {
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255, 249, 232, .92));
}
.plan-suspended-panel .modal-header h2 {
    color: #07162d;
}
.plan-suspended-panel .modal-header p,
.plan-suspended-greeting {
    color: #111827;
    font-weight: 720;
}
.plan-suspended-message {
    display: grid;
    gap: 10px;
    padding: 16px;
    color: #111827;
    background: #fff8df;
    border: 1px solid rgba(180, 103, 0, .22);
    border-radius: 10px;
    line-height: 1.55;
    font-weight: 560;
}
.plan-suspended-message p {
    margin: 0;
}
.plan-suspended-footer {
    padding: 16px 0 0;
}

.plan-modal-panel .modal-header {
    padding: 16px 20px 14px;
}

.plan-modal-panel .modal-header h2 {
    margin-top: 6px;
    font-size: 1.05rem;
}

.plan-modal-panel .modal-header p {
    margin-top: 6px;
    font-size: .76rem;
    line-height: 1.4;
}

.plan-modal-panel .modal-body {
    padding: 18px 20px;
    max-height: calc(100vh - 172px);
    overflow: auto;
}

.plan-choice-grid {
    gap: 10px;
}

.plan-choice-card {
    min-height: 154px;
    padding: 13px;
    gap: 5px;
    border-radius: 9px;
}

.plan-choice-card strong {
    font-size: .9rem;
}

.plan-choice-card span,
.plan-choice-card small {
    font-size: .68rem;
    line-height: 1.35;
}

.plan-choice-card b {
    margin: 4px 0 6px;
    font-size: 1.08rem;
}

.plan-choice-card .button {
    min-height: 34px;
    border-radius: 8px;
    font-size: .72rem;
}

.plan-current-badge,
.custom-plan-kicker {
    min-height: 20px;
    padding: 0 7px;
    font-size: .56rem;
}

.custom-plan-card {
    min-height: 152px;
}

.custom-plan-card b {
    margin-top: 5px;
}

.plan-lock-note {
    margin-top: 10px;
    padding: 9px 11px;
    font-size: .72rem;
    border-radius: 8px;
}

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

@media (max-width: 560px) {
    .plan-modal-panel {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
    }

    .plan-modal-panel .modal-header,
    .plan-modal-panel .modal-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .plan-choice-grid {
        grid-template-columns: 1fr;
    }
}

.custom-plan-card .custom-plan-button,
.custom-plan-card .custom-plan-button:visited {
    color: #fff;
    background: #008c99;
    border-color: #008c99;
    text-shadow: none;
}

.custom-plan-card:hover .custom-plan-button,
.custom-plan-card .custom-plan-button:hover,
.custom-plan-card .custom-plan-button:focus-visible {
    color: #fff;
    background: #007985;
    border-color: #007985;
}

.modal-backdrop.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100vw;
    min-height: 100vh;
    padding: 24px;
    background: rgba(5, 24, 39, .72);
    backdrop-filter: blur(8px);
}

.modal-backdrop.feedback-modal .feedback-card {
    position: relative;
    z-index: 1;
    width: min(360px, calc(100vw - 32px));
    padding: 26px 24px 24px;
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(2, 12, 24, .28);
}

.modal-backdrop.feedback-modal .feedback-card .button {
    min-height: 38px;
    padding: 0 18px;
}

/* Ajustes finais de responsividade do painel */
@media (max-width: 900px) {
    html,
    body {
        overflow-x: hidden;
    }

    .shell {
        width: min(100% - 24px, 1180px);
    }

    .dashboard-main,
    .topbar + main:not(.dashboard-main) {
        padding-inline: 0;
    }

    .hero {
        align-items: stretch;
        gap: 12px;
    }

    .hero > div,
    .records-card,
    .settings-card,
    .card,
    .client-plan-strip,
    .modal-panel {
        min-width: 0;
    }

    .settings-grid,
    .settings-grid-small,
    .form-grid,
    .nfe-filter-grid,
    .billing-card-row,
    .client-plan-billing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field input,
    .field select,
    .ai-order-trigger,
    textarea {
        min-width: 0;
    }

    .ai-order-menu {
        max-height: min(360px, calc(100vh - 180px));
        overflow-y: auto;
    }
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 16px, 1180px);
    }

    .topbar-inner,
    .hero,
    .records-head,
    .client-plan-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .nav,
    .search-form,
    .hero .button,
    .nfe-filter-actions,
    .nfe-filter-actions .button,
    .modal-footer .button {
        width: 100%;
    }

    .settings-form {
        padding: 12px 12px 2px;
    }

    .settings-grid,
    .settings-grid-small,
    .form-grid,
    .nfe-filter-grid,
    .billing-card-row,
    .client-plan-billing,
    .client-module-grid,
    .metrics,
    .nfe-management-grid,
    .nfe-manager-kpis,
    .rh-fields-layout,
    .rh-extra-head,
    .rh-extra-row {
        grid-template-columns: 1fr !important;
    }

    .ai-order-trigger {
        min-height: 36px;
        font-size: .73rem;
    }

    .ai-order-menu {
        left: 0;
        right: 0;
        max-height: min(330px, calc(100vh - 160px));
    }

    .ai-order-option {
        padding: 9px;
    }

    .modal-panel,
    .plan-modal-panel,
    .performance-modal-panel,
    .signup-modal-panel,
    .admin-modal-panel {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        border-radius: 14px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .table-wrap,
    .usage-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrap table,
    .usage-table-wrap table {
        min-width: 640px;
    }

    .billing-qr-inner,
    .billing-qr-copy-row,
    .publication-update-modal-actions,
    .modal-footer {
        flex-direction: column;
    }

    .billing-qr-img {
        width: 96px;
        height: 96px;
    }

    .client-plan-billing .billing-card,
    .billing-card {
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .shell {
        width: min(100% - 12px, 1180px);
    }

    .settings-form {
        padding-inline: 10px;
    }

    .employee-modal-form fieldset {
        padding-inline: 10px;
    }

    .hero h1 {
        font-size: clamp(1.35rem, 8vw, 1.85rem);
    }

    .hero .subtitle,
    .field label,
    .settings-form .field label {
        overflow-wrap: anywhere;
    }

    .ai-order-trigger span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ai-order-menu {
        position: fixed;
        left: 8px;
        right: 8px;
        top: auto;
        bottom: 12px;
        max-height: min(70vh, 410px);
    }
}

/* Estado de plano vencido no dashboard do cliente */
.client-dashboard .billing-expiry-status {
    font-size: .82rem;
    font-weight: 900;
}
.client-dashboard .billing-expiry-date {
    color: #0f172a;
    font-size: .72rem;
    font-weight: 850;
    line-height: 1.1;
}
.client-dashboard .billing-suspended-card {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #9f2a20;
    border-color: rgba(180, 35, 24, .22);
    background: linear-gradient(135deg, #fff, #fff4e6);
}
.client-dashboard .billing-suspended-card .billing-expiry-icon {
    color: #9f2a20;
    background: #fff0ee;
}
.client-module-card.locked.is-suspended {
    position: relative;
    overflow: hidden;
    color: #526173;
    background: linear-gradient(135deg, #fff, #f8fafc);
    border-color: rgba(148, 163, 184, .34);
    box-shadow: none;
    cursor: pointer;
}
.client-module-card.locked.is-suspended:hover {
    transform: none;
    border-color: rgba(180, 35, 24, .22);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}
.client-module-card.locked.is-suspended::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, .42);
    pointer-events: none;
}
.client-module-lock-icon {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    color: #9f2a20;
    background: #fff0ee;
    border: 1px solid rgba(180, 35, 24, .18);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(180, 35, 24, .08);
    pointer-events: none;
    z-index: 1;
}
.client-module-lock-icon svg {
    width: 14px;
    height: 14px;
    display: block;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.client-module-card.locked.is-suspended strong {
    padding-right: 28px;
}
.whatsapp-float.dashboard-support-float {
    width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
}
.whatsapp-float.dashboard-support-float span {
    width: 100%;
    height: 100%;
    background: transparent;
}
.whatsapp-float.dashboard-support-float svg {
    width: 26px;
    height: 26px;
}
@media (max-width: 680px) {
    .whatsapp-float.dashboard-support-float {
        right: 14px;
        bottom: 14px;
        width: 48px;
        height: 48px;
        min-height: 48px;
    }
    .whatsapp-float.dashboard-support-float svg {
        width: 23px;
        height: 23px;
    }
    .client-module-lock-icon {
        right: 8px;
        top: 8px;
    }
}

/* Login master: composicao visual institucional - Clean white design */
/* Clean white login design - no dark overlays */
.login-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 13px 0 0;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.45;
    text-align: center;
}
.login-legal-links a {
    color: #006b78;
    font-weight: 760;
    text-decoration: none;
    transition: color .18s ease, text-decoration-color .18s ease;
}
.login-legal-links a:hover,
.login-legal-links a:focus-visible {
    color: #064e5b;
    text-decoration: underline;
    text-decoration-color: rgba(6, 78, 91, .35);
    text-underline-offset: 3px;
}
@keyframes login-ambient-grid {
    0%, 100% { opacity: .58; transform: translate3d(0, 0, 0); }
    50% { opacity: .82; transform: translate3d(-18px, 10px, 0); }
}
@keyframes login-ambient-panel {
    0%, 100% { opacity: .62; transform: scale(1); }
    50% { opacity: .84; transform: scale(1.015); }
}
@media (max-width: 760px) {
    /* Clean white design - no dark overlays needed */
}

/* Correcoes de proporcao da tela inicial e logins. */
@media (min-width: 901px) {
    .login-page {
        padding-left: clamp(28px, 4vw, 56px);
        padding-right: clamp(28px, 4vw, 56px);
    }
    .login-shell {
        width: min(1120px, 100%);
        grid-template-columns: minmax(560px, .98fr) minmax(330px, 360px);
        gap: clamp(56px, 7vw, 94px);
    }
    .login-card:not(.client-login-card) {
        margin-top: clamp(44px, 5vh, 64px);
    }
}
.login-intro {
    min-height: 100%;
    padding: clamp(18px, 2.2vw, 28px);
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, #ffffff, #f8fbfc);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.login-intro h1 {
    max-width: 690px;
}
.login-plans {
    max-width: 100%;
}
.login-plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.login-plan {
    min-height: 108px;
    padding: 11px 10px;
    border-radius: 11px;
}
.login-plan.a1-plan {
    border-color: var(--cyan);
    background: var(--cyan-soft);
}
.login-plan strong {
    font-size: .8rem;
}
.login-plan span,
.login-plan small {
    font-size: .63rem;
}
.login-plan b {
    margin-top: 7px;
    font-size: .92rem;
}
.plan-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.plan-choice-card {
    min-height: 148px;
    padding: 12px;
}
.client-module-card.locked.is-a1-only {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #fff, #f6fbfc);
    border-color: rgba(0, 140, 153, .22);
}
.client-module-card.locked.is-a1-only strong {
    padding-right: 30px;
}
.dfe-a1-required-panel,
.dfe-a1-access-card {
    max-width: 640px;
}
.dfe-a1-access-card {
    margin: 42px auto;
    padding: 28px;
}
.dfe-a1-access-card h1 {
    margin: 8px 0 10px;
    color: var(--ink);
    font-size: 1.55rem;
    line-height: 1.15;
}
.dfe-a1-access-card p {
    color: var(--muted);
    line-height: 1.55;
}
.dfe-a1-benefits {
    display: grid;
    gap: 8px;
    margin: 16px 0 4px;
}
.dfe-a1-benefits span {
    padding: 9px 11px;
    color: #083b46;
    background: #eefbfc;
    border: 1px solid rgba(0, 140, 153, .15);
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 760;
}
.plan-a1-badge {
    display: inline-flex;
    width: fit-content;
    min-height: 22px;
    align-items: center;
    margin: 5px 0;
    padding: 0 8px;
    color: #006b75;
    background: #e6f8fa;
    border: 1px solid rgba(0, 140, 153, .2);
    border-radius: 99px;
    font-size: .66rem;
    font-weight: 850;
}
.admin-overdue-summary {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin-left: 8px;
    padding: 0 9px;
    color: #9f2a20;
    background: #fff0ee;
    border: 1px solid rgba(180, 35, 24, .18);
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 850;
}
.company-row-overdue {
    background: linear-gradient(90deg, rgba(255, 240, 238, .72), rgba(255, 255, 255, 0));
}
.admin-company-status-control {
    width: 132px;
}
.admin-company-plan-cell {
    min-width: 0;
}
.admin-company-plan-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.admin-company-plan-control,
.admin-company-plan-status-control {
    width: 108px;
}
.admin-company-date-control {
    width: 132px;
    margin-top: 0;
}
.admin-company-status-control,
.admin-company-plan-control,
.admin-company-plan-status-control,
.admin-company-date-control {
    max-width: 100%;
}
@media (max-width: 980px) {
    .login-plans,
    .plan-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .login-plans,
    .plan-choice-grid {
        grid-template-columns: 1fr;
    }
}
.login-heading > span {
    display: block;
    margin-bottom: 10px;
}
.login-heading p {
    margin-bottom: 14px;
}
.login-card .login-button,
.client-login-card .login-button {
    width: fit-content;
    min-width: 0;
    min-height: 39px;
    gap: 38px;
    padding: 0 15px 0 16px;
    justify-content: center;
}
.client-login-card .login-button {
    gap: 34px;
}
.login-card .login-button span,
.client-login-card .login-button span {
    line-height: 1;
}
@media (max-width: 900px) {
    .login-intro {
        min-height: 0;
        padding: 18px 16px;
        border-radius: 22px;
    }
}
@media (max-width: 420px) {
    .login-card .login-button,
    .client-login-card .login-button {
        width: 100%;
        justify-content: space-between;
    }
}

/* Ajuste da lista de recursos da tela publica de login. */
.login-features {
    width: min(100%, 690px);
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    column-gap: 26px;
    row-gap: 8px;
}
.login-features span {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 0;
    padding: 0;
    color: #d6e3e9;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: .76rem;
    font-weight: 650;
    line-height: 1.35;
}
.login-features i {
    flex: 0 0 auto;
    margin-top: 1px;
}

@media (max-width: 640px) {
    .login-features {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-flow: row;
    }
}
.login-plan .login-plan-badge {
    position: absolute;
    top: 0;
    right: 10px;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    width: max-content;
    margin: 0;
    padding: 3px 7px;
    color: #082b3d;
    background: linear-gradient(135deg, #e7fbfd, #7ee2e8);
    border: 0;
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 900;
    letter-spacing: .07em;
    line-height: 1.1;
    text-transform: uppercase;
}
.login-card .login-footer {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 4px 0 0;
    padding-top: 5px;
    color: #6f8497;
    border-top: 1px solid rgba(15, 47, 75, .1);
    font-size: .52rem;
    font-weight: 650;
    line-height: 1.18;
    text-align: center;
}
.login-card:not(.client-login-card) .login-button {
    margin-top: 13px;
}
.login-card:not(.client-login-card) .login-actions {
    margin-top: 8px;
}
.login-card:not(.client-login-card) .login-legal-links {
    margin-top: 10px;
}
.login-card:not(.client-login-card) .login-security {
    margin-top: 6px;
}

/* Correção: remove moldura dupla e mantém movimento ambiente contínuo. */
.login-page {
    background-size: 130% 130%, 130% 130%, 140% 140%, 100% 100%;
    animation: login-background-breathe 18s ease-in-out infinite;
}
.login-page::before {
    background:
        linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .026) 1px, transparent 1px),
        radial-gradient(circle at 30% 42%, rgba(125, 211, 252, .08), transparent 26rem);
    background-size: 76px 76px, 76px 76px, 120% 120%;
    animation: login-ambient-grid 16s ease-in-out infinite;
}
.login-page::after {
    content: "";
    position: absolute;
    inset: -22% -18%;
    z-index: 0;
    pointer-events: none;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(105deg, transparent 28%, rgba(148, 210, 221, .11) 43%, rgba(45, 212, 191, .075) 50%, transparent 66%),
        radial-gradient(circle at 72% 54%, rgba(255, 255, 255, .07), transparent 22rem);
    box-shadow: none;
    opacity: .62;
    transform: translate3d(-12%, 0, 0);
    animation: login-soft-loop 20s ease-in-out infinite;
}
.login-intro {
    min-height: auto;
    border-color: rgba(148, 210, 221, .16);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .048), rgba(45, 212, 191, .03)),
        linear-gradient(180deg, rgba(255, 255, 255, .025), transparent);
}
@keyframes login-background-breathe {
    0%, 100% { background-position: 0% 50%, 100% 40%, 70% 80%, 0 0; }
    50% { background-position: 8% 42%, 92% 48%, 62% 74%, 0 0; }
}
@keyframes login-soft-loop {
    0%, 100% { opacity: .48; transform: translate3d(-14%, 0, 0) skewX(-5deg); }
    50% { opacity: .78; transform: translate3d(12%, 0, 0) skewX(-5deg); }
}
@media (prefers-reduced-motion: reduce) {
    .login-page,
    .login-page::before,
    .login-page::after {
        animation: none;
    }
}
@media (max-width: 760px) {
    .login-page::after {
        content: "";
        display: block;
        inset: -30% -55%;
        background: linear-gradient(105deg, transparent 30%, rgba(148, 210, 221, .08) 48%, transparent 66%);
        animation: login-soft-loop 22s ease-in-out infinite;
    }
}

/* Auditoria master por empresa */
.company-audit-card {
    display: grid;
    gap: 16px;
}
.company-audit-filter {
    grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(150px, .55fr)) auto;
}
.company-audit-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.company-audit-summary span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    color: #0f4f5d;
    background: #eefafa;
    border: 1px solid rgba(0, 140, 153, .16);
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 800;
}
.company-audit-table td strong {
    display: block;
}
.company-audit-table td small,
.company-audit-card td small {
    color: #718096;
    font-size: .7rem;
}
.company-audit-table th,
.company-audit-table td {
    vertical-align: top;
}
@media (max-width: 900px) {
    .company-audit-filter {
        grid-template-columns: 1fr;
    }
}

/* Tela inicial publica: mobile mais curto e profissional. */
@media (max-width: 760px) {
    .login-body {
        min-height: 100svh;
        overflow: auto;
        background: #f2f7fb;
    }

    .login-page {
        min-height: 100svh;
        height: auto;
        max-height: none;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: max(14px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
        overflow-y: auto;
        scrollbar-gutter: auto;
        background: #f2f7fb;
        animation: none;
    }

    /* Clean white design - no decorative elements */

    .login-shell {
        width: 100%;
        max-width: 430px;
        gap: 10px;
        margin: 0 auto;
        align-items: start;
    }

    .login-intro {
        display: block;
        width: 100%;
        padding: 12px 14px;
        color: var(--ink);
        text-align: left;
        border-radius: 16px;
        background: #ffffff;
        border: 1px solid var(--line);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        animation: none;
    }

    .login-eyebrow {
        margin-bottom: 7px;
        padding: 4px 7px;
        border-radius: 999px;
        font-size: .52rem;
        letter-spacing: .12em;
    }

    .login-intro h1 {
        max-width: 100%;
        margin: 0 0 7px;
        font-size: clamp(1.28rem, 6.4vw, 1.62rem);
        line-height: 1.08;
        letter-spacing: 0;
    }

    .login-intro > p {
        max-width: 100%;
        margin: 0;
        color: var(--muted);
        font-size: .74rem;
        line-height: 1.38;
    }

    .login-features,
    .login-plans {
        display: none !important;
    }

    .login-card:not(.client-login-card) {
        width: 100%;
        max-width: 430px;
        margin: 0;
        padding: 17px 16px 14px;
        border-radius: 16px;
        border-color: #e5e7eb;
        background: #ffffff;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
        animation: none;
    }

    .login-card:not(.client-login-card)::after {
        content: none;
        display: none;
    }

    .login-card:not(.client-login-card) .login-brand {
        margin-bottom: 10px;
    }

    .login-logo-img {
        max-width: 154px;
        height: 34px;
    }

    .login-heading > span {
        margin-bottom: 5px;
        font-size: .6rem;
        letter-spacing: .09em;
    }

    .login-heading p {
        margin-bottom: 9px;
        font-size: .73rem;
        line-height: 1.32;
    }

    .login-card:not(.client-login-card) .login-form label {
        margin: 8px 0 4px;
        font-size: .66rem;
    }

    .login-card:not(.client-login-card) .input-wrap input {
        min-height: 39px;
        padding-top: 7px;
        padding-bottom: 7px;
        border-radius: 8px;
        font-size: 16px;
    }

    .login-card:not(.client-login-card) .login-button {
        width: 100%;
        min-height: 40px;
        margin-top: 12px;
        justify-content: space-between;
        border-radius: 9px;
    }

    .login-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 8px;
    }

    .login-actions .button,
    .login-client-shortcut {
        min-height: 37px;
        border-radius: 9px;
        font-size: .74rem;
        white-space: normal;
    }

    .login-card:not(.client-login-card) .login-legal-links {
        gap: 4px 6px;
        margin-top: 9px;
        font-size: .6rem;
        line-height: 1.3;
    }

    .login-card:not(.client-login-card) .login-security {
        margin-top: 5px;
        font-size: .58rem;
    }

    .login-card .login-footer {
        margin-top: 5px;
        padding-top: 6px;
        font-size: .5rem;
        line-height: 1.2;
    }
}

@media (max-width: 360px) {
    .login-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .login-intro {
        padding: 10px 12px;
    }

    .login-card:not(.client-login-card) {
        padding: 15px 13px 13px;
    }

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

/* Desktop baixo: evita que o bloco inicial ultrapasse a margem inferior. */
@media (min-width: 901px) and (max-height: 820px) {
    .login-page {
        align-items: start;
        padding-top: clamp(18px, 3vh, 28px);
        padding-bottom: 18px;
    }

    .login-shell {
        transform: translateY(-16px);
        gap: clamp(34px, 5vw, 64px);
    }

    .login-card:not(.client-login-card) {
        margin-top: 0;
    }

    .login-intro {
        padding: 16px 18px;
        border-radius: 24px;
    }

    .login-intro h1 {
        max-width: 620px;
        font-size: clamp(2rem, 3.4vw, 2.85rem);
        line-height: 1.04;
    }

    .login-intro > p {
        font-size: .82rem;
        line-height: 1.52;
    }

    .login-features {
        margin-top: 16px;
        row-gap: 6px;
    }

    .login-plans {
        margin-top: 16px;
    }

    .login-plan {
        min-height: 94px;
        padding: 10px;
    }
}

/* DF-e SEFAZ: automacao, alertas, certificado, sessoes e backup. */
.dfe-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 10px;
}

.dfe-status-card {
    min-height: 0;
    padding: 10px 12px;
    border-radius: 8px;
}

.dfe-status-card h2 {
    margin: 0 0 5px;
    font-size: .88rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.dfe-status-card p {
    margin: 2px 0;
    color: var(--ink-soft);
    font-size: .7rem;
    line-height: 1.25;
}

.dfe-status-card small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .64rem;
    font-weight: 760;
    line-height: 1.25;
}

.dfe-config-grid select,
.dfe-field select {
    width: 100%;
    min-height: 34px;
    padding: 6px 9px;
    color: var(--ink);
    background: #f8fafc;
    border: 1px solid #d5dfe9;
    border-radius: 8px;
    font-size: .74rem;
}

.dfe-export-list,
.dfe-info-list {
    display: grid;
    gap: 7px;
    margin-top: 10px;
}

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

.dfe-export-list a,
.dfe-info-list span {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    color: #083b46;
    background: #eefafa;
    border: 1px solid rgba(0, 140, 153, .16);
    border-radius: 7px;
    font-size: .68rem;
    font-weight: 800;
    text-decoration: none;
}

.dfe-export-list a {
    justify-content: center;
    text-align: center;
}

.dfe-export-list a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.dfe-info-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 10px;
}

.dfe-info-list span {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
}

.dfe-info-list strong {
    color: var(--muted);
    font-size: .58rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.dfe-backup-link {
    margin-top: 10px;
}

.inline-form {
    display: inline;
    margin: 0;
}

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

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

@media (max-width: 560px) {
    .dfe-status-grid,
    .dfe-export-list,
    .dfe-info-list {
        grid-template-columns: 1fr;
    }
}

/* Tela inicial desktop: composicao limpa, corporativa e sem bloco pesado. */
@media (min-width: 901px) {
    .login-body {
        min-height: 100vh;
        overflow: auto;
        background: #f2f7fb;
    }

    .login-page {
        min-height: 100vh;
        height: auto;
        max-height: none;
        display: grid;
        place-items: start center;
        padding: clamp(32px, 5vh, 54px) clamp(28px, 6vw, 88px) 28px;
        overflow: hidden auto;
        background: #f2f7fb;
        animation: none;
    }

    /* Clean white design - no decorative elements */

    .login-shell {
        width: min(1080px, 100%);
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        align-items: start;
        gap: clamp(48px, 6vw, 82px);
        margin: 0 auto;
        transform: none;
    }

    .login-intro {
        min-height: 0;
        margin-top: 14px;
        padding: 0;
        color: var(--ink);
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        animation: none;
    }

    .login-eyebrow {
        margin-bottom: 18px;
        padding: 7px 10px;
        color: var(--cyan-dark);
        background: var(--cyan-soft);
        border-color: rgba(0, 140, 153, 0.2);
        border-radius: 8px;
        font-size: .62rem;
        letter-spacing: .16em;
    }

    .login-intro h1 {
        max-width: 650px;
        margin-bottom: 16px;
        font-size: clamp(2.35rem, 4vw, 3.35rem);
        line-height: 1.04;
        letter-spacing: -.035em;
    }

    .login-intro > p {
        max-width: 660px;
        margin-bottom: 0;
        color: var(--muted);
        font-size: .9rem;
        line-height: 1.62;
    }

    .login-features {
        width: min(100%, 660px);
        margin-top: 24px;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-flow: row;
        grid-template-rows: none;
        column-gap: 22px;
        row-gap: 10px;
    }

    .login-features span {
        align-items: flex-start;
        color: var(--ink-soft);
        font-size: .77rem;
        font-weight: 760;
        line-height: 1.35;
    }

    .login-features i {
        width: 18px;
        height: 18px;
        margin-top: 0;
        background: var(--cyan-soft);
    }

    .login-plans {
        width: min(100%, 660px);
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 24px;
    }

    .login-plan {
        min-height: 90px;
        padding: 11px 12px;
        color: var(--ink);
        background: #ffffff;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: none;
    }

    .login-plan.featured,
    .login-plan.a1-plan {
        background: var(--cyan-soft);
        border-color: var(--cyan);
    }

    .login-plan strong {
        color: var(--ink);
        font-size: .78rem;
    }

    .login-plan span,
    .login-plan small {
        margin-top: 4px;
        color: var(--muted);
        font-size: .6rem;
        line-height: 1.2;
    }

    .login-plan b {
        margin-top: 9px;
        color: var(--cyan-dark);
        font-size: .92rem;
    }

    .login-plan-badge,
    .login-plan .login-plan-badge {
        top: -1px;
        right: 8px;
        padding: 3px 7px;
        font-size: .52rem;
        transform: translateY(-50%);
    }

    .login-card:not(.client-login-card) {
        width: 360px;
        max-width: 360px;
        justify-self: end;
        margin: 0;
        padding: 25px 22px 22px;
        border-radius: 14px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
        animation: none;
    }

    .login-card:not(.client-login-card)::after {
        content: none;
        display: none;
    }

    .login-card:not(.client-login-card) .login-brand {
        margin-bottom: 22px;
    }

    .login-heading > span {
        margin-bottom: 10px;
        font-size: .66rem;
    }

    .login-heading p {
        margin-bottom: 17px;
        font-size: .79rem;
        line-height: 1.48;
    }

    .login-card:not(.client-login-card) .login-form label {
        margin: 12px 0 6px;
    }

    .login-card:not(.client-login-card) .input-wrap input {
        min-height: 39px;
        border-radius: 8px;
    }

    .login-card:not(.client-login-card) .login-button {
        width: 180px;
        min-height: 39px;
        margin-top: 14px;
        border-radius: 9px;
    }

    .login-card:not(.client-login-card) .login-actions {
        gap: 9px;
        margin-top: 10px;
    }

    .login-card:not(.client-login-card) .login-legal-links {
        margin-top: 12px;
        font-size: .63rem;
    }

    .login-card:not(.client-login-card) .login-security {
        margin-top: 7px;
    }
}

@media (min-width: 901px) and (max-height: 760px) {
    .login-page {
        padding-top: 20px;
    }

    .login-shell {
        gap: 48px;
    }

    .login-intro {
        margin-top: 2px;
    }

    .login-intro h1 {
        max-width: 610px;
        font-size: clamp(2rem, 3.45vw, 2.85rem);
    }

    .login-intro > p {
        font-size: .82rem;
        line-height: 1.48;
    }

    .login-features,
    .login-plans {
        margin-top: 16px;
    }

    .login-plan {
        min-height: 82px;
        padding: 9px 10px;
    }

    .login-card:not(.client-login-card) {
        padding: 22px 22px 18px;
    }
}

/* Desktop final: sem rolagem vazia em janela normal/anônima. */
@media (min-width: 901px) {
    body.login-body {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .login-page {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        max-height: none;
        overflow: hidden;
    }

    .login-page::after {
        content: none;
        display: none;
    }
}

@media (min-width: 901px) and (max-height: 700px) {
    .login-page {
        padding-top: 18px;
        padding-bottom: 14px;
    }

    .login-shell {
        width: min(1060px, 100%);
        grid-template-columns: minmax(0, 1fr) 350px;
        gap: 44px;
    }

    .login-eyebrow {
        margin-bottom: 13px;
        padding: 6px 9px;
    }

    .login-intro h1 {
        max-width: 580px;
        margin-bottom: 12px;
        font-size: clamp(1.85rem, 3.25vw, 2.55rem);
        line-height: 1.03;
    }

    .login-intro > p {
        max-width: 620px;
        font-size: .78rem;
        line-height: 1.42;
    }

    .login-features {
        width: min(100%, 640px);
        margin-top: 14px;
        row-gap: 8px;
    }

    .login-features span {
        font-size: .72rem;
        line-height: 1.26;
    }

    .login-plans {
        width: min(100%, 640px);
        margin-top: 15px;
    }

    .login-plan {
        min-height: 76px;
        padding: 8px 10px;
    }

    .login-plan strong {
        font-size: .72rem;
    }

    .login-plan span,
    .login-plan small {
        font-size: .56rem;
    }

    .login-plan b {
        margin-top: 6px;
        font-size: .84rem;
    }

    .login-card:not(.client-login-card) {
        width: 350px;
        max-width: 350px;
        padding: 18px 20px 15px;
    }

    .login-card:not(.client-login-card) .login-brand {
        margin-bottom: 14px;
    }

    .login-logo-img {
        height: 34px;
        max-width: 150px;
    }

    .login-heading > span {
        margin-bottom: 7px;
        font-size: .61rem;
    }

    .login-heading p {
        margin-bottom: 10px;
        font-size: .73rem;
    }

    .login-card:not(.client-login-card) .login-form label {
        margin: 8px 0 4px;
        font-size: .65rem;
    }

    .login-card:not(.client-login-card) .input-wrap input {
        min-height: 36px;
    }

    .login-card:not(.client-login-card) .login-button,
    .login-actions .button,
    .login-client-shortcut {
        min-height: 36px;
    }

    .login-card:not(.client-login-card) .login-button {
        margin-top: 11px;
    }

    .login-card:not(.client-login-card) .login-actions {
        margin-top: 8px;
    }

    .login-card:not(.client-login-card) .login-legal-links {
        margin-top: 9px;
        font-size: .58rem;
        line-height: 1.28;
    }

    .login-card:not(.client-login-card) .login-security {
        margin-top: 5px;
        font-size: .56rem;
    }

    .login-card .login-footer {
        margin-top: 4px;
        padding-top: 5px;
        font-size: .47rem;
    }
}

/* Ajuste final de altura: centraliza sem voltar a criar scroll vazio. */
@media (min-width: 901px) {
    .login-page {
        place-items: center;
        padding-top: clamp(24px, 4vh, 42px);
        padding-bottom: clamp(24px, 4vh, 42px);
    }

    .login-shell {
        align-items: center;
    }
}

@media (min-width: 901px) and (max-height: 700px) {
    .login-page {
        place-items: center;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .login-shell {
        align-items: center;
        transform: translateY(10px);
    }
}

@media (min-width: 901px) and (max-height: 640px) {
    .login-shell {
        transform: translateY(4px);
    }
}

/* Centralizacao final do login: sem deslocamento manual, usando o centro real da viewport. */
@media (min-width: 901px) {
    body.login-body {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    .login-page {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        display: grid !important;
        place-content: center !important;
        place-items: center !important;
        padding-top: 24px !important;
        padding-bottom: 24px !important;
        overflow: hidden !important;
    }

    .login-shell {
        min-height: 0 !important;
        align-items: center !important;
        margin: 0 auto !important;
        transform: none !important;
    }
}

@media (min-width: 901px) and (max-height: 700px) {
    .login-shell {
        transform: none !important;
    }
}

@media (min-width: 901px) and (max-height: 620px) {
    .login-shell {
        transform: none !important;
    }
}

/* Login institucional: composicao fiel ao material de referencia. */
.login-body {
    background: #f5fbfe;
}

.login-page {
    background:
        radial-gradient(circle at 74% 8%, rgba(146, 220, 239, .22), transparent 31%),
        radial-gradient(circle at 9% 43%, rgba(193, 235, 247, .32), transparent 33%),
        linear-gradient(112deg, #fbfdfe 0%, #f4fbfe 48%, #eef9fc 100%);
}

.login-bg-decor {
    opacity: 1;
}

.login-bg-nfe {
    top: .5%;
    left: 0;
    width: 310px;
    height: 470px;
    overflow: visible;
    opacity: .92;
    transform: none;
    animation: none;
    filter: drop-shadow(0 14px 28px rgba(30, 64, 175, .12));
}

.login-bg-nfe > img {
    display: block;
    width: 310px;
    max-width: none;
    height: auto;
    transform: translateX(-62px);
    transform-origin: left top;
}

.login-bg-nfe > .login-bg-nfe-vector,
.login-bg-decor > .login-bg-xml-vector {
    display: none !important;
}

.login-bg-xml {
    bottom: 2%;
    left: 22px;
    width: 235px;
    height: auto;
    opacity: .9;
    transform: rotate(-2deg);
    transform-origin: left bottom;
    animation: none;
    filter: drop-shadow(0 12px 24px rgba(30, 64, 175, .11));
}

.login-bg-curves {
    opacity: .42;
}

.login-shell {
    width: min(1200px, calc(100% - 64px));
    grid-template-columns: minmax(0, 744px) minmax(360px, 420px);
    gap: clamp(32px, 3vw, 48px);
}

.login-intro {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-eyebrow {
    margin-bottom: 17px;
    padding: 7px 13px;
    background: rgba(237, 250, 252, .92);
    border-color: rgba(0, 140, 153, .26);
    border-radius: 9px;
    font-size: .66rem;
}

.login-intro h1 {
    max-width: 680px;
    margin-bottom: 12px;
    color: #12345c;
    font-size: clamp(2.45rem, 3.1vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -.045em;
}

.login-intro > p {
    max-width: 720px;
    margin-bottom: 0;
    color: #263f61;
    font-size: .86rem;
    line-height: 1.48;
}

.login-features {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-flow: row;
    column-gap: 30px;
    row-gap: 10px;
    margin-top: 21px;
    color: #142e52;
    font-size: .75rem;
    font-weight: 760;
}

.login-features span {
    min-width: 0;
    gap: 9px;
    color: #183654;
    font-weight: 720;
}

.login-features i {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 2px 6px rgba(0, 140, 153, .1);
}

.login-bg-process {
    position: static;
    width: min(100%, 640px);
    margin: 24px auto 17px;
    transform: none;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    opacity: 1;
}

.login-bg-process-item {
    width: 150px;
    gap: 6px;
    color: #12345c;
    font-size: .72rem;
    font-weight: 780;
    line-height: 1.28;
}

.login-bg-process-item svg {
    width: 62px;
    height: 62px;
    filter: drop-shadow(0 6px 10px rgba(16, 47, 75, .1));
}

.login-bg-process-arrow {
    width: 58px;
    margin-top: 19px;
    color: #3b9eaa;
    font-size: 1.35rem;
    text-align: center;
}

.login-plans {
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

.login-plan {
    min-height: 110px;
    padding: 11px 12px;
    border-color: rgba(0, 140, 153, .3);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(16, 47, 75, .045);
}

.login-plan.a1-plan {
    background: rgba(255, 255, 255, .88);
}

.login-plan strong {
    padding-bottom: 0;
    margin-bottom: 1px;
    border-bottom: 0;
    font-size: .78rem;
}

.login-plan span,
.login-plan small {
    margin-top: 3px;
    color: #53677f;
    font-size: .62rem;
}

.login-plan b {
    margin-top: 7px;
    color: #006873;
    font-size: .91rem;
}

.login-plan-badge {
    padding: 3px 9px;
    color: #006c78;
    background: #dff6f8;
    border: 1px solid rgba(0, 140, 153, .24);
    font-size: .55rem;
}

.login-card:not(.client-login-card) {
    width: 100%;
    max-width: 420px;
    margin-top: 0;
    padding: 25px 25px 18px;
    border-color: rgba(16, 47, 75, .1);
    border-radius: 18px;
    box-shadow: 0 22px 48px rgba(16, 47, 75, .11);
}

.login-card:not(.client-login-card) .login-brand {
    margin-bottom: 17px;
}

.login-card:not(.client-login-card) .login-heading p {
    margin: 8px 0 14px;
    color: #52667e;
}

.login-card:not(.client-login-card) .login-brand small {
    color: #52677d;
}

.login-card:not(.client-login-card) .login-security {
    color: #607287;
}

.login-card:not(.client-login-card) .login-button {
    white-space: nowrap;
}

.login-card:not(.client-login-card) .login-footer {
    position: static;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e5edf3;
    color: #5c7088;
    font-size: .54rem;
    line-height: 1.35;
}

@media (max-width: 1450px) and (min-width: 901px) {
    .login-bg-nfe {
        display: block;
        width: clamp(92px, calc((100vw - 1160px) / 2 - 22px), 136px);
        overflow: hidden;
        opacity: .68;
    }

    .login-bg-nfe > img {
        width: 250px;
        transform: translateX(-10px);
    }

    .login-bg-xml {
        display: block;
        left: -48px;
        width: 180px;
        opacity: .74;
    }

    .login-shell {
        width: min(1160px, calc(100% - 48px));
        grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
        gap: 34px;
    }
}

@media (min-width: 901px) and (max-height: 760px) {
    .login-shell {
        width: min(1120px, calc(100% - 44px));
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 32px;
    }

    .login-eyebrow {
        margin-bottom: 10px;
    }

    .login-intro h1 {
        max-width: 620px;
        margin-bottom: 9px;
        font-size: clamp(2rem, 3.4vw, 2.65rem);
    }

    .login-intro > p {
        font-size: .77rem;
        line-height: 1.38;
    }

    .login-features {
        margin-top: 14px;
        row-gap: 7px;
        font-size: .69rem;
    }

    .login-bg-process {
        margin: 15px auto 10px;
    }

    .login-bg-process-item svg {
        width: 44px;
        height: 44px;
    }

    .login-bg-process-arrow {
        margin-top: 13px;
    }

    .login-plan {
        min-height: 78px;
        padding: 8px 9px;
    }

    .login-card:not(.client-login-card) {
        width: 380px;
        max-width: 380px;
        padding: 20px 22px 16px;
    }
}

@media (max-width: 900px) {
    body.login-body {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }

    .login-page {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        height: auto;
        min-height: 100dvh;
        max-height: none;
        overflow-y: auto;
        padding: 26px 18px 38px;
    }

    .login-bg-nfe,
    .login-bg-xml,
    .login-bg-process-arrow {
        display: none;
    }

    .login-shell {
        width: min(620px, 100%);
        max-width: 620px;
        display: flex;
        flex-direction: column;
        gap: 24px;
        align-self: center;
        margin: 0 auto;
    }

    .login-intro {
        display: block;
        width: 100%;
    }

    .login-card:not(.client-login-card) {
        order: -1;
        justify-self: auto;
        align-self: center;
        max-width: 440px;
    }

    .login-intro h1 {
        font-size: clamp(2rem, 9vw, 2.75rem);
    }

    .login-bg-process {
        margin: 20px auto 15px;
        gap: 4px;
    }

    .login-bg-process-item {
        width: 33.333%;
        font-size: .66rem;
    }

    .login-bg-process-item svg {
        width: 46px;
        height: 46px;
    }

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

@media (max-width: 520px) {
    .login-features {
        display: grid !important;
        grid-template-columns: 1fr;
        margin-top: 18px;
        row-gap: 8px;
        font-size: .7rem;
    }

    .login-plans {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 16px;
    }

    .login-plan {
        min-height: 86px;
        padding: 9px 10px;
    }

    .login-bg-process {
        align-items: stretch;
    }

    .login-bg-process-item {
        font-size: .6rem;
    }
}

@media (max-width: 760px) {
    .login-features,
    .login-plans {
        display: grid !important;
    }
}
