:root {
    --bg: #0b0c0e;
    --sidebar: #101114;
    --panel: #15171b;
    --panel-soft: #1a1d22;
    --line: rgba(244, 206, 116, 0.15);
    --gold: #f4ce74;
    --gold-strong: #c08b2e;
    --text: #f5f3ee;
    --muted: #a8a191;
    --positive: #77ecab;
    --neutral: #ffd27a;
    --negative: #ff907d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(244, 206, 116, 0.12), transparent 24%),
        linear-gradient(180deg, #0f1012 0%, #090a0c 100%);
}

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

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

.sidebar {
    position: relative;
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        var(--sidebar);
    transition: width 250ms ease, padding 250ms ease;
    overflow: hidden;
}

.sidebar-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
    z-index: 2;
}

.sidebar-toggle:hover {
    border-color: rgba(244, 206, 116, 0.25);
    background: rgba(244, 206, 116, 0.08);
    color: var(--gold);
}

.sidebar-collapsed .sidebar {
    width: 72px;
    min-width: 72px;
    padding: 24px 18px;
}

.sidebar-collapsed .sidebar-toggle {
    position: static;
    margin: 0 auto 16px;
    right: auto;
}

.sidebar-collapsed .brand div,
.sidebar-collapsed .menu a,
.sidebar-collapsed .menu-label,
.sidebar-collapsed .menu-separator,
.sidebar-collapsed .sidebar-card {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    transition: opacity 200ms ease, height 200ms ease;
}

.sidebar-collapsed .brand {
    justify-content: center;
    margin-bottom: 12px;
    gap: 0;
}

.sidebar-collapsed .brand img {
    width: 38px;
    height: 38px;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand img {
    width: 52px;
    height: 52px;
}

.brand strong,
.eyebrow,
h1,
h2,
.button,
.badge {
    font-family: "Space Grotesk", sans-serif;
}

.brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.88rem;
}

.menu {
    display: grid;
    gap: 8px;
}

.menu-label {
    margin-top: 10px;
    padding: 4px 14px 0;
    color: var(--gold);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.menu-separator {
    width: 100%;
    height: 1px;
    margin: 12px 0 6px;
    border: 0;
    background: rgba(255, 255, 255, 0.08);
}

.menu a {
    padding: 13px 14px;
    border-radius: 16px;
    color: var(--muted);
    text-decoration: none;
    transition: 180ms ease;
}

.menu a:hover,
.menu a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-card,
.panel,
.summary-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.sidebar-card {
    margin-top: 28px;
    padding: 18px;
    border-radius: 22px;
}

.sidebar-card .label,
.summary-card span,
.allocation-item span,
.ledger-list span,
.eyebrow {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
}

.sidebar-card strong {
    display: block;
    margin: 10px 0 8px;
}

.sidebar-card strong[data-user-role] {
    display: inline;
    margin: 0;
}

.sidebar-card p,
.insight-card p,
.risk-row p,
.next-steps li {
    color: var(--muted);
    line-height: 1.65;
}

.sidebar-meta {
    margin: 4px 0 0;
}

.profile-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 800;
}

.profile-toggle.is-clickable {
    cursor: pointer;
    transition: color 180ms ease, opacity 180ms ease;
}

.profile-toggle.is-clickable:hover {
    color: var(--gold);
}

.profile-toggle:disabled {
    opacity: 1;
}

.sidebar-actions {
    margin-top: 18px;
}

.sidebar-logout {
    width: 100%;
}

.sidebar-version {
    margin: 14px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.content {
    padding: 30px;
    /* Filho de .app-shell grid: sem isto, min-width:auto deixa o conteudo “vazar” horizontalmente */
    min-width: 0;
    max-width: 100%;
}

.mobile-app-bar {
    display: none;
    align-items: center;
    gap: 14px;
}

.mobile-app-bar__title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.nav-backdrop-app {
    position: fixed;
    inset: 0;
    z-index: 90;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(3px);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.nav-backdrop-app[hidden] {
    display: none !important;
}

.mobile-menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 180ms ease, background 180ms ease;
}

.mobile-menu-toggle:hover {
    border-color: rgba(244, 206, 116, 0.3);
    background: rgba(244, 206, 116, 0.08);
}

.mobile-menu-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: currentColor;
    border-radius: 1px;
    transition: transform 220ms ease, opacity 220ms ease;
}

.app-shell.nav-open .mobile-menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.app-shell.nav-open .mobile-menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.app-shell.nav-open .mobile-menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.content-header {
    display: block;
    margin-bottom: 26px;
}

.eyebrow {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.eyebrow.small {
    font-size: 0.7rem;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
}

h1 {
    margin: 10px 0 0;
    max-width: 760px;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

h2 {
    margin: 8px 0 0;
    font-size: 1.28rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
}

.button.primary {
    color: #1e1609;
    background: linear-gradient(135deg, #f7df9d 0%, #f4ce74 48%, #b98126 100%);
}

.button.subtle {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.inline-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gold);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    min-height: 100vh;
}

.site-footer {
    margin-top: 28px;
    padding: 0 30px 30px;
}

.site-footer.content-footer {
    padding: 34px 0 8px;
}

.site-footer__inner {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.site-footer__inner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.98rem;
}

.site-footer__inner a {
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}

.site-footer__inner a:hover {
    color: #f7df9d;
}

.auth-showcase,
.auth-panel {
    padding: 42px;
}

.auth-showcase {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(244, 206, 116, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        transparent;
}

.auth-brand {
    display: inline-flex;
    margin-bottom: 40px;
}

.auth-brand img {
    width: 184px;
    height: auto;
}

.auth-showcase h1 {
    max-width: 640px;
}

.auth-showcase p {
    max-width: 600px;
    color: var(--muted);
    line-height: 1.75;
    font-size: 1.04rem;
}

.auth-proof {
    display: grid;
    gap: 14px;
    margin-top: 26px;
}

.auth-proof article,
.auth-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.auth-proof article {
    padding: 18px 20px;
    border-radius: 20px;
}

.auth-proof strong {
    display: block;
    margin-bottom: 4px;
}

.auth-note {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(244, 206, 116, 0.14);
    border-radius: 18px;
    background: rgba(244, 206, 116, 0.06);
}

.auth-note strong {
    font-family: "Space Grotesk", sans-serif;
    color: var(--gold);
}

.auth-note span {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.auth-proof span,
.auth-copy,
.auth-footer span,
.checkbox span,
.auth-form label span,
.field-help {
    color: var(--muted);
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: min(100%, 520px);
    padding: 30px;
    border-radius: 28px;
}

.auth-card h2 {
    margin-top: 8px;
    font-size: 2rem;
}

.auth-copy {
    margin: 10px 0 0;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.auth-form.compact {
    margin-top: 16px;
}

.auth-form label {
    display: grid;
    gap: 8px;
    font-size: 0.92rem;
}

.auth-form label span em {
    font-style: normal;
    color: var(--gold);
    opacity: 0.82;
}

.field-help {
    display: block;
    margin-top: -2px;
    font-size: 0.84rem;
    line-height: 1.55;
}

.form-message {
    min-height: 22px;
    margin: 2px 2px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-message[data-state="success"] {
    color: var(--positive);
}

.form-message[data-state="error"] {
    color: var(--negative);
}

.form-message[data-state="info"] {
    color: var(--gold);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top, rgba(244, 206, 116, 0.08), transparent 26%),
        rgba(5, 6, 9, 0.82);
    backdrop-filter: blur(14px);
}

.modal-backdrop[hidden] {
    display: none;
}

.terms-modal {
    width: min(100%, 840px);
    max-height: min(88vh, 920px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border: 1px solid rgba(244, 206, 116, 0.16);
    border-radius: 34px;
    background:
        radial-gradient(circle at top left, rgba(244, 206, 116, 0.1), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        #111215;
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.terms-header,
.terms-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 26px;
}

.terms-header {
    align-items: start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
        rgba(255, 255, 255, 0.015);
}

.terms-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.015);
}

.modal-inline-actions {
    margin-top: 4px;
    padding: 0;
    border: 0;
}

.terms-header h3 {
    margin: 10px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.45rem, 2vw, 1.8rem);
    letter-spacing: -0.04em;
}

.terms-intro {
    margin: 14px 0 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.96rem;
}

.terms-content {
    overflow: auto;
    padding: 22px 26px 28px;
    display: grid;
    gap: 14px;
    scroll-padding-top: 22px;
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 206, 116, 0.45) rgba(255, 255, 255, 0.04);
}

.terms-content::-webkit-scrollbar {
    width: 12px;
}

.terms-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
    border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.terms-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(247, 223, 157, 0.75), rgba(185, 129, 38, 0.92));
    border: 2px solid rgba(17, 18, 21, 0.92);
    border-radius: 999px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(247, 223, 157, 0.9), rgba(185, 129, 38, 1));
}

.terms-content section {
    padding: 18px 18px 18px 20px;
    border: 1px solid rgba(244, 206, 116, 0.08);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    position: relative;
}

.terms-content section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7df9d 0%, #f4ce74 48%, #b98126 100%);
}

.terms-content h4 {
    margin: 0 0 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.02rem;
    color: var(--gold);
}

.terms-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.74;
    font-size: 0.95rem;
}

.modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
    transition: 160ms ease;
}

.modal-close:hover {
    border-color: rgba(244, 206, 116, 0.22);
    background: rgba(244, 206, 116, 0.08);
    color: var(--gold);
}

.confirm-modal {
    width: min(100%, 440px);
    border: 1px solid rgba(244, 206, 116, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(244, 206, 116, 0.1), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        #111215;
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.confirm-modal-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 26px 0;
}

.confirm-modal-header h3 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    letter-spacing: -0.04em;
}

.confirm-modal-body {
    padding: 14px 26px 24px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.96rem;
}

.confirm-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
}

.auth-form input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.auth-form input:focus {
    border-color: rgba(244, 206, 116, 0.45);
    background: rgba(255, 255, 255, 0.05);
}

.settings-grid textarea,
.funding-modal-body textarea {
    width: 100%;
    min-height: 120px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 160ms ease, background 160ms ease;
}

.settings-grid textarea:focus,
.funding-modal-body textarea:focus {
    border-color: rgba(244, 206, 116, 0.45);
    background: rgba(255, 255, 255, 0.05);
}

.funding-panel {
    gap: 18px;
}

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

.funding-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.deposit-requests {
    display: grid;
    gap: 16px;
}

.deposit-request-card,
.deposit-request-empty,
.funding-destination-card {
    padding: 20px 22px;
    border-radius: 24px;
    border: 1px solid rgba(244, 206, 116, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.01);
}

.deposit-request-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.deposit-request-head h3 {
    margin: 8px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.deposit-request-meta {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
}

.deposit-request-meta p,
.funding-destination-card p {
    margin: 0;
}

.deposit-request-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.deposit-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(244, 206, 116, 0.16);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
    color: var(--text);
}

.deposit-status-badge[data-status="requested"] {
    color: var(--gold);
}

.deposit-status-badge[data-status="transferred"] {
    color: #8cc7ff;
}

.deposit-status-badge[data-status="credited"] {
    color: var(--positive);
}

.deposit-status-badge[data-status="rejected"] {
    color: var(--negative);
}

.funding-modal {
    width: min(100%, 760px);
}

.funding-modal-body {
    gap: 16px;
}

.funding-modal-body label {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.funding-modal-body label span {
    font-weight: 600;
}

.funding-destination-card {
    display: grid;
    gap: 10px;
}

.funding-destination-value {
    display: block;
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.92rem;
}

.auth-row a,
.auth-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
}

.checkbox {
    display: inline-flex !important;
    grid-auto-flow: column;
    align-items: center;
    justify-content: start;
    gap: 10px;
}

.checkbox input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
}

.terms {
    align-items: start;
}

.auth-submit {
    width: 100%;
    min-height: 56px;
}

.auth-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 0.95rem;
}

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

.workspace-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
}

.workspace-card {
    padding: 26px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.workspace-card.soft p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
    font-size: 1.02rem;
}

.page-copy.small {
    font-size: 0.95rem;
}

.admin-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-overview-panels {
    margin-top: 16px;
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.overview-metric {
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.overview-metric span {
    color: var(--muted);
    font-size: 0.84rem;
}

.overview-metric strong {
    display: block;
    margin-top: 10px;
    font-size: 1.28rem;
}

/* Visão geral admin: evita vazamento horizontal (pulso do dia + últimos eventos) */
[data-overview-page] .content-header.users-header {
    min-width: 0;
    max-width: 100%;
}

[data-overview-page] .summary-grid.admin-overview-grid {
    min-width: 0;
}

[data-overview-page] .admin-overview-panels.workspace-hero {
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 761px) {
    [data-overview-page] .admin-overview-panels.workspace-hero {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

[data-overview-page] .admin-overview-panels .workspace-card {
    min-width: 0;
    max-width: 100%;
}

[data-overview-page] .admin-overview-panels .workspace-card h2 {
    overflow-wrap: anywhere;
}

[data-overview-page] .overview-metrics {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-overview-page] .overview-metric {
    min-width: 0;
}

[data-overview-page] .overview-metric span {
    overflow-wrap: anywhere;
}

[data-overview-page] .overview-metric strong {
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 3.8vw, 1.28rem);
}

[data-overview-page] .admin-overview-panels .users-table-wrap {
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

[data-overview-page] .admin-overview-panels .users-table {
    min-width: 30rem;
    width: max-content;
    max-width: none;
}

[data-overview-page] .admin-overview-panels .users-table th,
[data-overview-page] .admin-overview-panels .users-table td {
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

@media (max-width: 760px) {
    [data-overview-page] .admin-overview-panels .users-table {
        min-width: 26rem;
    }
}

.compact-table .users-table td,
.compact-table .users-table th {
    padding-top: 16px;
    padding-bottom: 16px;
}

.summary-inline-value {
    font-size: 1rem !important;
    line-height: 1.5;
    word-break: break-all;
}

.performance-panel {
    margin-top: 18px;
}

.performance-bars {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(24px, 1fr);
    align-items: end;
    gap: 10px;
    min-height: 240px;
    margin-top: 8px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent),
        rgba(255, 255, 255, 0.015);
    overflow-x: auto;
}

.performance-bar {
    display: grid;
    gap: 10px;
    align-items: end;
    justify-items: center;
    min-height: 180px;
}

.performance-bar__value {
    display: block;
    width: 100%;
    min-height: 8px;
    border-radius: 999px 999px 10px 10px;
    background: rgba(255, 255, 255, 0.2);
}

.performance-bar.is-positive .performance-bar__value {
    background: linear-gradient(180deg, rgba(119, 236, 171, 0.98), rgba(39, 160, 103, 0.82));
}

.performance-bar.is-negative .performance-bar__value {
    background: linear-gradient(180deg, rgba(255, 144, 125, 0.98), rgba(198, 84, 67, 0.82));
}

.performance-bar.is-neutral .performance-bar__value {
    background: linear-gradient(180deg, rgba(255, 210, 122, 0.88), rgba(192, 139, 46, 0.72));
}

.performance-bar__label {
    color: var(--muted);
    font-size: 0.74rem;
    white-space: nowrap;
}

.performance-empty {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 180px;
    color: var(--muted);
}

.signals-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.signal-chip {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(244, 206, 116, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 0.92rem;
}

.signal-chip strong {
    color: var(--gold);
}

.signal-chip.is-empty {
    color: var(--muted);
}

.logs-panel {
    margin-top: 18px;
}

.compact-actions {
    margin-top: 0;
    padding: 0;
}

.logs-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.logs-search-field {
    flex: 1;
    display: grid;
    gap: 8px;
}

.logs-search-field span {
    font-size: 0.92rem;
    color: var(--muted);
}

.logs-search-field input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.logs-search-field input:focus {
    border-color: rgba(244, 206, 116, 0.45);
    background: rgba(255, 255, 255, 0.05);
}

.logs-view {
    min-height: 420px;
    margin: 8px 0 0;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #0f1013;
    color: #d8e6db;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
}

.summary-card,
.panel {
    padding: 22px;
    border-radius: 24px;
}

.summary-card strong {
    display: block;
    margin: 8px 0 6px;
    font-size: 2rem;
}

[data-broker-page] .summary-card [data-broker-email] {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.summary-card small {
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    margin-top: 18px;
}

.users-header {
    margin-bottom: 22px;
}

.page-copy {
    max-width: 760px;
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.72;
    font-size: 1rem;
}

.users-summary-grid {
    margin-bottom: 18px;
}

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

.app-shell[data-deposits-page] .users-panel {
    margin-top: 20px;
}

.deposits-request-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
    align-items: start;
}

.deposits-address-card {
    min-height: 100%;
    justify-content: center;
}

.deposits-address-card strong {
    margin: 14px 0 12px;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    letter-spacing: -0.03em;
    word-break: break-word;
}

.deposits-address-card small {
    max-width: 26ch;
    line-height: 1.65;
}

.deposits-request-form {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
}

.deposits-request-grid {
    gap: 18px;
}

.deposits-request-grid input {
    min-height: 52px;
}

.deposits-request-actions {
    margin-top: 8px;
    justify-content: flex-start;
}

.withdrawals-request-form {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 24px;
}

.withdrawals-request-grid {
    gap: 18px;
}

.withdrawals-request-grid input {
    min-height: 52px;
}

.withdrawals-request-actions {
    margin-top: 8px;
    justify-content: flex-start;
}

.signals-panel {
    padding: 20px;
    margin-top: 20px;
}

.ledger-event {
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
    text-transform: lowercase;
}

.ledger-path {
    color: var(--muted);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.82rem;
    word-break: break-word;
}

.orders-symbol,
.orders-owner {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    color: var(--text);
}

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

.table-action-select {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
}

.table-action-input {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
}

.table-action-input::placeholder {
    color: var(--muted);
}

.table-action-button {
    min-height: 38px;
    justify-content: center;
}

.table-action-button--danger {
    color: var(--negative);
    border-color: rgba(255, 144, 125, 0.18);
    background: rgba(255, 144, 125, 0.06);
}

.table-action-button--danger:hover {
    border-color: rgba(255, 144, 125, 0.28);
    background: rgba(255, 144, 125, 0.1);
}

.settings-form {
    display: grid;
    gap: 18px;
}

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

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

.settings-grid label {
    display: grid;
    gap: 8px;
}

.settings-grid input,
.settings-grid textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

.settings-switch {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
}

.settings-switch input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
}

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

.settings-actions {
    display: flex;
    justify-content: flex-end;
}

.users-message {
    margin-bottom: 16px;
}

/* Configurações: base mobile-first (somente [data-settings-page]) */
[data-settings-page] .settings-form,
[data-settings-page] .panel.settings-panel {
    min-width: 0;
    max-width: 100%;
}

[data-settings-page] .users-summary-grid .summary-card {
    min-width: 0;
}

[data-settings-page] .settings-grid > label {
    min-width: 0;
}

[data-settings-page] .settings-grid textarea {
    word-break: break-word;
}

[data-settings-page] .users-header {
    margin-bottom: 14px;
    min-width: 0;
}

[data-settings-page] .users-header .eyebrow:not(.small) {
    font-size: 0.74rem;
    letter-spacing: 0.11em;
}

[data-settings-page] .users-header h1 {
    margin-top: 8px;
    max-width: 100%;
    font-size: clamp(1.38rem, 5vw + 0.55rem, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.038em;
    overflow-wrap: anywhere;
}

[data-settings-page] .users-header .page-copy {
    margin-top: 10px;
    font-size: 0.91rem;
    line-height: 1.58;
}

[data-settings-page] .settings-form {
    gap: 14px;
}

@media (min-width: 640px) {
    [data-settings-page] .users-header {
        margin-bottom: 22px;
    }

    [data-settings-page] .users-header h1 {
        font-size: clamp(1.75rem, 3.2vw, 2.85rem);
        margin-top: 10px;
    }

    [data-settings-page] .users-header .page-copy {
        margin-top: 14px;
        font-size: 1rem;
        line-height: 1.72;
    }

    [data-settings-page] .settings-form {
        gap: 18px;
    }
}

/* Motor: 2 colunas desde o telefone (mais denso); 4 em desktop; minmax(0,1fr) evita vazamento */
[data-settings-page] .users-summary-grid.summary-grid {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 640px) {
    [data-settings-page] .users-summary-grid.summary-grid {
        gap: 14px;
    }
}

@media (min-width: 1024px) {
    [data-settings-page] .users-summary-grid.summary-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }
}

[data-settings-page] .users-summary-grid .summary-card {
    padding: 14px 12px;
    border-radius: 16px;
}

[data-settings-page] .users-summary-grid .summary-card > span:first-child {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
}

[data-settings-page] .users-summary-grid .summary-card strong {
    margin: 6px 0 4px;
    font-size: clamp(1.15rem, 4.2vw, 1.75rem);
    word-break: break-word;
}

[data-settings-page] .users-summary-grid .summary-card small {
    font-size: 0.78rem;
    line-height: 1.45;
    display: block;
}

[data-settings-page] .settings-panel .panel-header {
    margin-bottom: 14px;
}

[data-settings-page] .settings-panel .panel-header h2 {
    font-size: clamp(1.05rem, 3.5vw, 1.28rem);
    line-height: 1.2;
}

@media (min-width: 640px) {
    [data-settings-page] .users-summary-grid .summary-card {
        padding: 18px 16px;
        border-radius: 20px;
    }

    [data-settings-page] .settings-panel .panel-header {
        margin-bottom: 18px;
    }

    [data-settings-page] .settings-panel .panel-header h2 {
        font-size: 1.28rem;
    }
}

[data-settings-page] .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 640px) {
    [data-settings-page] .settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

[data-settings-page] .settings-panel > .settings-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

[data-settings-page] .settings-panel > .settings-actions .button {
    width: 100%;
    justify-content: center;
}

@media (min-width: 720px) {
    [data-settings-page] .settings-panel > .settings-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
    }

    [data-settings-page] .settings-panel > .settings-actions .button {
        width: auto;
        flex: 1 1 auto;
        min-width: min(100%, 148px);
    }
}

@media (max-width: 639px) {
    [data-settings-page] .settings-form > .settings-actions {
        justify-content: stretch;
    }

    [data-settings-page] .settings-form > .settings-actions .button {
        width: 100%;
    }
}

[data-settings-page] .users-table-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
}

[data-settings-page] .users-table {
    min-width: 40rem;
}

@media (min-width: 900px) {
    [data-settings-page] .users-table {
        min-width: 53.75rem;
    }
}

@media (max-width: 519px) {
    [data-settings-page] .panel.settings-panel {
        padding: 16px 14px;
        border-radius: 18px;
    }

    [data-settings-page] .users-table th,
    [data-settings-page] .users-table td {
        padding: 12px 12px;
    }
}

.users-table-wrap {
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.users-table th,
.users-table td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.users-table th {
    color: var(--gold);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.03);
}

.users-table td {
    color: var(--text);
    vertical-align: middle;
}

.users-name,
.users-balance {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.users-email,
.users-balance-meta {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.users-balance-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.users-balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.84rem;
    font-weight: 600;
}

.users-balance-pill--free {
    color: var(--positive);
}

.users-balance-pill--locked {
    color: var(--negative);
}

.users-balance-separator {
    color: rgba(255, 255, 255, 0.18);
}

.users-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.users-table tbody tr.orders-row {
    transition: background 180ms ease, box-shadow 180ms ease;
}

.users-table tbody tr.orders-row.is-profitable {
    background: linear-gradient(90deg, rgba(119, 236, 171, 0.16), rgba(119, 236, 171, 0.03) 22%, rgba(255, 255, 255, 0) 58%);
    box-shadow: inset 3px 0 0 rgba(119, 236, 171, 0.95);
}

.users-table tbody tr.orders-row.is-losing {
    background: linear-gradient(90deg, rgba(255, 144, 125, 0.15), rgba(255, 144, 125, 0.03) 22%, rgba(255, 255, 255, 0) 58%);
    box-shadow: inset 3px 0 0 rgba(255, 144, 125, 0.9);
}

.users-table tbody tr.orders-row.is-flat {
    background: linear-gradient(90deg, rgba(244, 206, 116, 0.08), rgba(244, 206, 116, 0.02) 22%, rgba(255, 255, 255, 0) 58%);
    box-shadow: inset 3px 0 0 rgba(244, 206, 116, 0.45);
}

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

.orders-pnl {
    font-weight: 700;
}

.order-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(119, 236, 171, 0.4);
    border-radius: 6px;
    background: rgba(119, 236, 171, 0.1);
    color: rgba(119, 236, 171, 0.9);
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}

.order-close-btn:hover {
    background: rgba(119, 236, 171, 0.25);
    border-color: rgba(119, 236, 171, 0.7);
}

.order-close-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.users-credit-actions {
    min-width: 280px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.users-credit-input {
    min-width: 140px;
    margin: 0;
}

.users-credit-buttons {
    display: grid;
    grid-template-columns: repeat(2, 52px);
    gap: 8px;
}

.table-action-button--icon {
    width: 52px;
    min-width: 52px;
    padding: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.table-action-button--icon span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.users-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.users-pagination__summary,
.users-pagination__page {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

.users-pagination__button {
    min-width: 118px;
    justify-content: center;
}

.users-pagination__button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-badge.role-admin {
    color: var(--gold);
    background: rgba(244, 206, 116, 0.12);
}

.status-badge.role-investor {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.status-badge.is-active {
    color: var(--positive);
    background: rgba(119, 236, 171, 0.12);
}

.status-badge.is-inactive {
    color: var(--negative);
    background: rgba(255, 144, 125, 0.12);
}

.status-badge.is-wallet-configured {
    color: var(--gold);
    background: rgba(244, 206, 116, 0.12);
}

.status-badge.is-wallet-missing {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
}

.panel.large {
    grid-row: span 2;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--gold);
    background: rgba(244, 206, 116, 0.09);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.allocation-list,
.ledger-list,
.risk-stack,
.next-steps {
    display: grid;
    gap: 12px;
}

.allocation-item,
.ledger-list li,
.risk-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: var(--panel-soft);
}

.allocation-item strong,
.ledger-list strong {
    display: block;
}

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

.ledger-list em {
    font-style: normal;
    color: var(--text);
    white-space: nowrap;
}

.insight-card {
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(244, 206, 116, 0.08), rgba(255, 255, 255, 0.03));
}

.insight-card strong {
    display: block;
    margin-bottom: 8px;
}

.risk-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.safe { color: var(--positive); background: rgba(119, 236, 171, 0.12); }
.watch { color: var(--neutral); background: rgba(255, 210, 122, 0.12); }
.defend { color: var(--gold); background: rgba(244, 206, 116, 0.12); }
.exit { color: var(--negative); background: rgba(255, 144, 125, 0.12); }

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

.positive { color: var(--positive); }
.neutral { color: var(--neutral); }

@media (max-width: 1180px) {
    .app-shell,
    .app-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar-collapsed .sidebar {
        width: auto;
        min-width: 0;
        padding: 24px;
    }

    .sidebar-collapsed .brand div,
    .sidebar-collapsed .menu a,
    .sidebar-collapsed .menu-label,
    .sidebar-collapsed .menu-separator,
    .sidebar-collapsed .sidebar-card {
        opacity: 1;
        visibility: visible;
        height: auto;
        overflow: visible;
    }

    .sidebar-collapsed .brand {
        justify-content: flex-start;
        gap: 14px;
        margin-bottom: 28px;
    }

    .sidebar-collapsed .brand img {
        width: 52px;
        height: 52px;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .dashboard-grid,
    .summary-grid,
    .workspace-hero {
        grid-template-columns: 1fr 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .content {
        padding: 18px;
    }

    .panel-header,
    .allocation-item,
    .ledger-list li,
    .risk-row {
        flex-direction: column;
        align-items: start;
    }

    .button {
        width: 100%;
    }

    .dashboard-grid,
    .summary-grid,
    .workspace-hero {
        grid-template-columns: 1fr;
    }

    .auth-showcase,
    .auth-panel {
        padding: 22px;
    }

    .summary-card strong {
        font-size: 1.6rem;
    }

    .auth-row,
    .auth-footer {
        flex-direction: column;
        align-items: start;
    }

    .terms-header,
    .terms-actions,
    .terms-content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .terms-content {
        padding-top: 18px;
        padding-bottom: 22px;
    }

    .terms-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .users-pagination,
    .users-pagination__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .users-pagination__button {
        width: 100%;
    }

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

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

    .deposits-request-layout {
        grid-template-columns: 1fr;
    }

    .deposits-request-form {
        padding: 18px;
    }

    .settings-actions {
        justify-content: stretch;
    }

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

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

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

    .terms-content section {
        padding: 16px 16px 16px 18px;
    }

    .site-footer {
        padding: 0 18px 24px;
    }

    .site-footer.content-footer {
        padding: 28px 0 4px;
    }

    /* .summary-grid acima forca 1 col; Configuracoes mantem 2 no motor ate caber melhor */
    [data-settings-page] .users-summary-grid.summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .app-shell,
    .app-shell.sidebar-collapsed {
        display: block;
        min-height: 100vh;
    }

    .app-shell > .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 88vw);
        max-width: 100%;
        margin: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        border-bottom: none;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 240ms ease;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .app-shell.nav-open > .sidebar {
        transform: translateX(0);
    }

    .sidebar-collapsed .sidebar {
        width: min(300px, 88vw);
        min-width: 0;
        padding: 24px;
    }

    .app-shell > .content {
        width: 100%;
        min-height: 100vh;
    }

    .mobile-app-bar {
        display: flex;
        margin: -30px -30px 22px;
        padding: 14px 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(11, 12, 14, 0.94);
        backdrop-filter: blur(14px);
        position: sticky;
        top: 0;
        z-index: 80;
        width: calc(100% + 60px);
        margin-left: -30px;
        margin-right: -30px;
        box-sizing: border-box;
    }
}

@media (max-width: 760px) {
    .mobile-app-bar {
        margin-top: -18px;
        margin-left: -18px;
        margin-right: -18px;
        width: calc(100% + 36px);
    }
}
