/* AConceituar Financeiro — interface sem dependências externas */
:root {
    color-scheme: light;
    --brand-950: #0b302d;
    --brand-900: #103f3b;
    --brand-800: #125149;
    --brand-700: #14645b;
    --brand-600: #17786d;
    --brand-500: #1d8f82;
    --brand-100: #d9f0ec;
    --brand-50: #eef9f7;
    --gold-600: #b97722;
    --gold-500: #d49335;
    --gold-100: #faebd3;
    --ink-950: #17201f;
    --ink-900: #202b2a;
    --ink-800: #34413f;
    --ink-700: #465552;
    --ink-600: #5d6c69;
    --ink-500: #74827f;
    --ink-400: #98a3a0;
    --ink-300: #b8c1bf;
    --ink-200: #d8dedc;
    --ink-150: #e4e9e7;
    --ink-100: #edf1f0;
    --ink-50: #f6f8f7;
    --surface: #ffffff;
    --page: #f3f6f5;
    --success-700: #167248;
    --success-600: #21895a;
    --success-100: #dff3e9;
    --danger-700: #b3363d;
    --danger-600: #cc454d;
    --danger-100: #fae5e6;
    --warning-700: #9a5d12;
    --warning-100: #fbefd8;
    --blue-700: #3568a8;
    --blue-100: #e4edf8;
    --violet-700: #7252aa;
    --violet-100: #ede7f8;
    --shadow-sm: 0 1px 2px rgba(18, 44, 41, .05), 0 1px 4px rgba(18, 44, 41, .035);
    --shadow-md: 0 8px 28px rgba(18, 44, 41, .08), 0 2px 8px rgba(18, 44, 41, .04);
    --shadow-lg: 0 22px 58px rgba(9, 35, 32, .16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --sidebar-width: 264px;
    --topbar-height: 70px;
    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink-900);
    background: var(--page);
    font-family: var(--font-sans);
    font-size: .9375rem;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.sidebar-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: var(--brand-700);
    text-decoration: none;
}

a:hover {
    color: var(--brand-900);
}

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

svg {
    fill: currentColor;
}

h1,
h2,
h3,
p,
dl,
dd {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink-950);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.025em;
}

h1 {
    margin-bottom: .45rem;
    font-size: clamp(1.65rem, 2.3vw, 2.05rem);
}

h2 {
    margin-bottom: .3rem;
    font-size: 1.08rem;
}

h3 {
    margin-bottom: .25rem;
    font-size: 1rem;
}

::selection {
    color: var(--brand-950);
    background: var(--brand-100);
}

:focus-visible {
    outline: 3px solid rgba(29, 143, 130, .28);
    outline-offset: 2px;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: .75rem;
    left: .75rem;
    padding: .7rem 1rem;
    color: #fff;
    background: var(--brand-700);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform .18s ease;
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

/* Marca */
.brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .75rem;
    color: var(--ink-950);
}

.brand:hover {
    color: var(--ink-950);
}

.brand__mark {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-500), var(--brand-900));
    border-radius: 11px 11px 11px 3px;
    box-shadow: 0 5px 16px rgba(12, 70, 64, .22);
}

.brand__mark::after {
    position: absolute;
    width: 18px;
    height: 18px;
    content: "";
    right: -8px;
    bottom: -8px;
    background: var(--gold-500);
    border-radius: 50%;
}

.brand__mark span {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.08em;
    transform: translateX(-1px);
}

.brand__text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.1;
}

.brand__text strong {
    overflow: hidden;
    font-size: 1.08rem;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
}

.brand__text small {
    margin-top: .22rem;
    color: var(--ink-500);
    font-size: .68rem;
    font-weight: 650;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.brand--light,
.brand--light:hover {
    color: #fff;
}

.brand--light .brand__text small {
    color: rgba(255, 255, 255, .63);
}

.brand__mark--light {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: none;
}

/* Estrutura do aplicativo */
.sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    color: rgba(255, 255, 255, .78);
    background:
        radial-gradient(circle at 105% -2%, rgba(83, 169, 156, .18), transparent 34%),
        linear-gradient(180deg, var(--brand-950), #092824);
    border-right: 1px solid rgba(255, 255, 255, .04);
}

.sidebar__brand {
    display: flex;
    min-height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: .95rem 1.15rem .9rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .075);
}

.sidebar .brand,
.sidebar .brand:hover {
    color: #fff;
}

.sidebar .brand__text small {
    color: rgba(255, 255, 255, .52);
}

.sidebar .brand__mark {
    background: linear-gradient(145deg, rgba(44, 162, 147, .95), rgba(18, 97, 88, .9));
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: none;
}

.sidebar__close {
    display: none !important;
    color: rgba(255, 255, 255, .8) !important;
}

.sidebar__nav {
    flex: 1;
    padding: 1.3rem .85rem;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.nav-label {
    margin: 0 .7rem .45rem;
    color: rgba(255, 255, 255, .36);
    font-size: .67rem;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.nav-label--secondary {
    margin-top: 1.4rem;
}

.nav-list {
    display: grid;
    gap: .18rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-link {
    position: relative;
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: .82rem;
    padding: .62rem .78rem;
    color: rgba(255, 255, 255, .69);
    border-radius: 9px;
    font-size: .87rem;
    font-weight: 540;
    transition: color .16s ease, background .16s ease, transform .16s ease;
}

.nav-link::before {
    position: absolute;
    width: 3px;
    content: "";
    inset: 9px auto 9px -14px;
    background: var(--gold-500);
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease;
    transform: translateX(-4px);
}

.nav-link svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    opacity: .74;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .065);
}

.nav-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(42, 151, 137, .28), rgba(255, 255, 255, .07));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045);
    font-weight: 650;
}

.nav-link.is-active::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-link.is-active svg {
    color: #75d0c3;
    opacity: 1;
}

.sidebar__footer {
    padding: .82rem;
    border-top: 1px solid rgba(255, 255, 255, .075);
}

.sidebar-user {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .65rem;
    padding: .55rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 11px;
}

.avatar {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;
    color: var(--brand-900);
    background: var(--brand-100);
    border: 1px solid rgba(20, 100, 91, .1);
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.sidebar-user .avatar {
    color: #d9fff8;
    background: rgba(38, 149, 135, .25);
    border-color: rgba(97, 203, 188, .15);
}

.sidebar-user__details {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    line-height: 1.25;
}

.sidebar-user__details strong {
    overflow: hidden;
    color: rgba(255, 255, 255, .92);
    font-size: .8rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user__details small {
    overflow: hidden;
    margin-top: .15rem;
    color: rgba(255, 255, 255, .44);
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user form {
    margin: 0;
}

.sidebar-user .icon-button {
    width: 31px;
    height: 31px;
    color: rgba(255, 255, 255, .55);
}

.sidebar-user .icon-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.sidebar-scrim {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: none;
    background: rgba(6, 28, 25, .6);
    opacity: 0;
    backdrop-filter: blur(2px);
}

.app-main {
    display: flex;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    flex-direction: column;
}

.topbar {
    position: sticky;
    z-index: 35;
    top: 0;
    display: flex;
    min-height: var(--topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: .7rem clamp(1rem, 2.4vw, 2.1rem);
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--ink-150);
    backdrop-filter: blur(14px) saturate(140%);
}

.topbar__left,
.topbar__actions {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.topbar__menu {
    display: none !important;
}

.topbar__welcome {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.topbar__welcome span {
    color: var(--ink-800);
    font-size: .85rem;
    font-weight: 650;
}

.topbar__welcome small {
    margin-top: .12rem;
    color: var(--ink-500);
    font-size: .7rem;
}

.topbar-avatar {
    display: none;
}

.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: var(--ink-600);
    background: transparent;
    border: 0;
    border-radius: 9px;
}

.icon-button:hover {
    color: var(--ink-900);
    background: var(--ink-100);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}

.page {
    width: 100%;
    max-width: 1600px;
    flex: 1;
    padding: clamp(1.2rem, 2.5vw, 2rem) clamp(1rem, 2.4vw, 2.1rem) 2.6rem;
    margin: 0 auto;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem clamp(1rem, 2.4vw, 2.1rem);
    color: var(--ink-500);
    border-top: 1px solid var(--ink-150);
    font-size: .7rem;
}

.flash-region {
    position: fixed;
    z-index: 80;
    top: calc(var(--topbar-height) + .85rem);
    right: 1rem;
    display: grid;
    width: min(420px, calc(100vw - 2rem));
    gap: .55rem;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .78rem .75rem;
    color: var(--ink-800);
    background: #fff;
    border: 1px solid var(--ink-150);
    border-left-width: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    animation: flash-in .24s ease both;
}

.flash.is-leaving {
    pointer-events: none;
    animation: flash-out .18s ease both;
}

.flash > span:nth-child(2) {
    flex: 1;
    padding-top: .08rem;
    font-size: .82rem;
}

.flash--success { border-left-color: var(--success-600); }
.flash--error { border-left-color: var(--danger-600); }
.flash--warning { border-left-color: var(--gold-500); }
.flash--info { border-left-color: var(--blue-700); }

.flash__icon {
    display: grid;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    place-items: center;
    color: var(--brand-700);
    background: var(--brand-100);
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
}

.flash--error .flash__icon { color: var(--danger-700); background: var(--danger-100); }
.flash--warning .flash__icon { color: var(--warning-700); background: var(--warning-100); }
.flash--info .flash__icon { color: var(--blue-700); background: var(--blue-100); }

.flash__close {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    padding: 0;
    place-items: center;
    color: var(--ink-500);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 1.2rem;
    line-height: 1;
}

.flash__close:hover {
    color: var(--ink-900);
    background: var(--ink-100);
}

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-7px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flash-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-7px); }
}

/* Cabeçalhos, botões e componentes gerais */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}

.page-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
}

.page-subtitle {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--ink-600);
    font-size: .9rem;
}

.page-header > div > p:last-child:not(.eyebrow) {
    margin-bottom: 0;
    color: var(--ink-600);
    font-size: .86rem;
}

.page-header--form {
    align-items: flex-start;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: .75rem;
    color: var(--brand-700);
    font-size: .7rem;
    font-weight: 700;
}

.eyebrow {
    margin-bottom: .35rem;
    color: var(--brand-600);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: #80d8cb;
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .6rem .95rem;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    transition: color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

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

.button:active {
    transform: translateY(0);
}

.button svg {
    width: 17px;
    height: 17px;
}

.button--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    border-color: var(--brand-700);
    box-shadow: 0 3px 9px rgba(16, 81, 73, .16);
}

.button--primary:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    box-shadow: 0 5px 14px rgba(16, 81, 73, .23);
}

.button--secondary {
    color: var(--ink-800);
    background: #fff;
    border-color: var(--ink-200);
    box-shadow: var(--shadow-sm);
}

.button--secondary:hover {
    color: var(--brand-800);
    background: var(--brand-50);
    border-color: #b8d8d2;
}

.button--danger {
    color: var(--danger-700);
    background: #fff;
    border-color: #efc4c7;
}

.button--danger:hover {
    color: #fff;
    background: var(--danger-600);
    border-color: var(--danger-600);
}

.button--ghost {
    color: var(--brand-700);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.button--ghost:hover {
    color: var(--brand-900);
    background: var(--brand-50);
    border-color: var(--brand-100);
}

.button--danger-ghost {
    color: var(--danger-700);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.button--danger-ghost:hover {
    color: var(--danger-700);
    background: var(--danger-100);
    border-color: #f1d0d2;
}

.button--compact {
    min-height: 37px;
    padding: .52rem .78rem;
}

.button--small {
    min-height: 34px;
    padding: .45rem .7rem;
    font-size: .75rem;
}

.button--large {
    min-height: 48px;
    padding: .75rem 1.1rem;
    font-size: .87rem;
}

.button--block {
    width: 100%;
}

.button[disabled],
.button.is-loading {
    cursor: wait;
    opacity: .72;
    transform: none;
}

.button-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

.button.is-loading .button-spinner {
    display: block;
}

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

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--brand-700);
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}

.text-link:hover span {
    transform: translateX(2px);
}

.text-link span {
    transition: transform .15s ease;
}

.panel {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.2rem 1rem;
    border-bottom: 1px solid var(--ink-100);
}

.panel__header h2 {
    margin-bottom: .2rem;
}

.panel__header p {
    margin-bottom: 0;
    color: var(--ink-500);
    font-size: .72rem;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .9rem 1rem;
    margin-bottom: 1.1rem;
    color: var(--ink-800);
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-size: .8rem;
}

.notice--info { border-left: 4px solid var(--blue-700); }
.notice--warning { border-left: 4px solid var(--gold-500); }
.notice--error { border-left: 4px solid var(--danger-600); }

.notice__icon {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    place-items: center;
    color: var(--blue-700);
    background: var(--blue-100);
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
}

.notice > div,
.notice > span:last-child {
    min-width: 0;
    flex: 1;
}

.inline-alert {
    padding: .75rem .85rem;
    color: var(--ink-700);
    background: var(--ink-50);
    border: 1px solid var(--ink-150);
    border-radius: 9px;
    font-size: .72rem;
}

.inline-alert--error {
    color: var(--danger-700);
    background: var(--danger-100);
    border-color: #efc9cb;
}

/* Dashboard */
.period-picker {
    display: flex;
    height: 40px;
    align-items: stretch;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: 9px;
    box-shadow: var(--shadow-sm);
}

.period-picker__arrow {
    display: grid;
    width: 34px;
    place-items: center;
    color: var(--ink-600);
    font-size: 1.35rem;
    line-height: 1;
}

.period-picker__arrow:hover {
    color: var(--brand-800);
    background: var(--brand-50);
}

.period-picker label {
    display: flex;
    align-items: center;
    border-right: 1px solid var(--ink-150);
    border-left: 1px solid var(--ink-150);
}

.period-picker input {
    width: 145px;
    height: 100%;
    padding: 0 .65rem;
    color: var(--ink-800);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: .76rem;
    font-weight: 650;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.metric-card {
    position: relative;
    min-width: 0;
    padding: 1rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.metric-card::before {
    position: absolute;
    height: 3px;
    content: "";
    inset: 0 0 auto;
    background: var(--metric-color, var(--brand-600));
    opacity: .88;
}

.metric-card:hover {
    border-color: #ccd5d3;
    box-shadow: 0 7px 20px rgba(18, 44, 41, .075);
    transform: translateY(-1px);
}

.metric-card--primary { --metric-color: var(--brand-600); --metric-soft: var(--brand-100); }
.metric-card--success { --metric-color: var(--success-600); --metric-soft: var(--success-100); }
.metric-card--warning { --metric-color: var(--gold-500); --metric-soft: var(--warning-100); }
.metric-card--danger { --metric-color: var(--danger-600); --metric-soft: var(--danger-100); }
.metric-card--violet { --metric-color: var(--violet-700); --metric-soft: var(--violet-100); }
.metric-card--blue { --metric-color: var(--blue-700); --metric-soft: var(--blue-100); }
.metric-card--teal { --metric-color: #2b938d; --metric-soft: #ddf2ef; }

.metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    margin-bottom: .75rem;
}

.metric-card__top p {
    overflow: hidden;
    margin-bottom: 0;
    color: var(--ink-600);
    font-size: .71rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card__icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    color: var(--metric-color);
    background: var(--metric-soft);
    border-radius: 9px;
}

.metric-card__icon svg {
    width: 17px;
    height: 17px;
}

.metric-card__value {
    display: block;
    overflow: hidden;
    margin-bottom: .48rem;
    color: var(--ink-950);
    font-size: clamp(1.13rem, 1.55vw, 1.38rem);
    line-height: 1.15;
    letter-spacing: -.045em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card__detail {
    min-height: 2em;
    margin: 0;
    overflow: hidden;
    color: var(--ink-500);
    font-size: .62rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.is-positive { color: var(--success-700) !important; }
.is-negative { color: var(--danger-700) !important; }
.is-muted { color: var(--ink-500) !important; }

.dashboard-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-grid--primary {
    grid-template-columns: minmax(0, 1.8fr) minmax(310px, .9fr);
}

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

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    color: var(--ink-600);
    font-size: .66rem;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    background: var(--ink-300);
    border-radius: 3px;
}

.legend-dot--income { background: var(--brand-600); }
.legend-dot--expense { background: var(--gold-500); }
.legend-dot--sharllonn { background: var(--brand-600); }
.legend-dot--sergio { background: var(--violet-700); }
.legend-dot--office { background: var(--blue-700); }
.legend-dot--reserve { background: var(--gold-500); }

.bar-chart {
    position: relative;
    height: 260px;
    padding: 1.1rem 1.2rem 1rem;
}

.bar-chart::before {
    position: absolute;
    content: "";
    inset: 1.1rem 1.2rem 2.35rem;
    background: repeating-linear-gradient(to bottom, var(--ink-100) 0, var(--ink-100) 1px, transparent 1px, transparent 25%);
    pointer-events: none;
}

.bar-chart__plot {
    position: relative;
    z-index: 1;
    display: grid;
    height: 100%;
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    align-items: stretch;
    gap: clamp(.6rem, 2vw, 1.7rem);
}

.bar-chart__group {
    display: grid;
    min-width: 0;
    grid-template-rows: minmax(0, 1fr) 1.25rem;
    gap: .45rem;
}

.bar-chart__bars {
    display: flex;
    min-height: 0;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(3px, .5vw, 7px);
}

.bar-chart__svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.bar-rect {
    transition: opacity .16s ease;
}

.bar-rect:hover {
    opacity: .82;
}

.bar-rect--income { fill: var(--brand-600); }
.bar-rect--expense { fill: var(--gold-500); }

.bar {
    display: block;
    width: min(17px, 34%);
    height: var(--bar-height);
    min-height: 3px;
    border-radius: 5px 5px 2px 2px;
    transition: filter .16s ease, transform .16s ease;
}

.bar:hover {
    filter: saturate(1.2) brightness(.94);
    transform: scaleX(1.06);
}

.bar--income { background: linear-gradient(180deg, #35a696, var(--brand-700)); }
.bar--expense { background: linear-gradient(180deg, #e5aa56, #c47b20); }

.bar-chart__label {
    align-self: center;
    overflow: hidden;
    color: var(--ink-500);
    font-size: .65rem;
    font-weight: 650;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.distribution-visual {
    display: grid;
    min-height: 260px;
    grid-template-columns: minmax(135px, .9fr) minmax(150px, 1.1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
}

.donut-chart {
    position: relative;
    display: grid;
    width: min(154px, 100%);
    aspect-ratio: 1;
    place-items: center;
    margin: auto;
    border-radius: 50%;
}

.donut-chart > div {
    position: absolute;
    z-index: 1;
    inset: 23%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: .5rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(20, 45, 42, .04);
    text-align: center;
}

.donut-chart > svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
}

.donut-chart__track,
.donut-chart__segment {
    fill: none;
    stroke-width: 18;
}

.donut-chart__track { stroke: var(--ink-100); }
.donut-chart__segment { stroke-linecap: butt; }
.donut-chart__segment--sharllonn { stroke: var(--brand-600); }
.donut-chart__segment--sergio { stroke: var(--violet-700); }
.donut-chart__segment--office { stroke: var(--blue-700); }
.donut-chart__segment--reserve { stroke: var(--gold-500); }

.donut-chart strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--ink-900);
    font-size: .78rem;
    letter-spacing: -.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donut-chart span {
    margin-top: .12rem;
    color: var(--ink-500);
    font-size: .58rem;
}

.distribution-list {
    display: grid;
    gap: .1rem;
    margin-bottom: 0;
}

.distribution-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--ink-100);
}

.distribution-list > div:last-child {
    border-bottom: 0;
}

.distribution-list dt {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .38rem;
    color: var(--ink-700);
    font-size: .68rem;
}

.distribution-list dt small {
    color: var(--ink-400);
    font-size: .58rem;
}

.distribution-list dd {
    flex: 0 0 auto;
    margin: 0;
    color: var(--ink-900);
    font-size: .68rem;
    font-weight: 750;
}

.due-list {
    display: grid;
}

.due-item {
    display: grid;
    min-width: 0;
    grid-template-columns: 5px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: .75rem;
    padding: .83rem 1.05rem;
    color: var(--ink-800);
    border-bottom: 1px solid var(--ink-100);
    transition: background .14s ease;
}

.due-item:last-child {
    border-bottom: 0;
}

.due-item:hover {
    color: var(--ink-900);
    background: var(--ink-50);
}

.due-item__marker {
    display: block;
    width: 4px;
    height: 34px;
    background: var(--brand-500);
    border-radius: 4px;
}

.due-item__marker--expense { background: var(--gold-500); }

.due-item__main,
.due-item__amount {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.due-item__main strong {
    overflow: hidden;
    font-size: .76rem;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.due-item__main small {
    overflow: hidden;
    margin-top: .18rem;
    color: var(--ink-500);
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.due-item__amount {
    align-items: flex-end;
}

.due-item__amount > strong {
    font-size: .73rem;
    white-space: nowrap;
}

.status {
    display: inline-flex;
    width: max-content;
    align-items: center;
    justify-content: center;
    padding: .16rem .42rem;
    margin-top: .2rem;
    color: var(--ink-700);
    background: var(--ink-100);
    border-radius: 100px;
    font-size: .54rem;
    font-weight: 700;
    line-height: 1.3;
}

.status--pending { color: var(--warning-700); background: var(--warning-100); }
.status--partial { color: var(--blue-700); background: var(--blue-100); }
.status--paid { color: var(--success-700); background: var(--success-100); }
.status--overdue { color: var(--danger-700); background: var(--danger-100); }
.status--cancelled { color: var(--ink-600); background: var(--ink-100); }
.status--success { color: var(--success-700); background: var(--success-100); }
.status--warning { color: var(--warning-700); background: var(--warning-100); }
.status--neutral { color: var(--ink-600); background: var(--ink-100); }

.due-item__chevron {
    width: 17px;
    height: 17px;
    color: var(--ink-400);
}

.empty-inline {
    display: flex;
    min-height: 118px;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: 1.25rem;
    color: var(--ink-500);
}

.empty-inline span {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    color: var(--success-700);
    background: var(--success-100);
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 800;
}

.empty-inline p {
    margin: 0;
    font-size: .75rem;
}

.empty-state {
    display: flex;
    min-height: 210px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1.5rem;
    color: var(--ink-500);
    text-align: center;
}

.empty-state--chart { min-height: 260px; }
.empty-state--compact { min-height: 260px; }

.empty-state__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: .7rem;
    color: var(--brand-600);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: 14px;
}

.empty-state__icon svg {
    width: 24px;
    height: 24px;
}

.empty-state strong {
    color: var(--ink-800);
    font-size: .82rem;
}

.empty-state p {
    max-width: 340px;
    margin: .28rem auto .85rem;
    font-size: .7rem;
}

.quick-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.15rem;
    margin-top: 1rem;
    background: linear-gradient(120deg, #fff, var(--brand-50));
    border: 1px solid #dce9e6;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.quick-actions h2 {
    margin-bottom: .15rem;
    font-size: .9rem;
}

.quick-actions p {
    margin: 0;
    color: var(--ink-500);
    font-size: .67rem;
}

.quick-actions__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .55rem;
}

.quick-actions__links > a {
    display: flex;
    min-width: 166px;
    align-items: center;
    gap: .6rem;
    padding: .6rem .72rem;
    color: var(--ink-800);
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.quick-actions__links > a:hover {
    color: var(--ink-950);
    border-color: #bfd5d1;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.quick-actions__links > a > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.quick-actions__links strong {
    font-size: .69rem;
}

.quick-actions__links small {
    margin-top: .1rem;
    color: var(--ink-500);
    font-size: .56rem;
}

.quick-action__icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    color: var(--brand-700);
    background: var(--brand-100);
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 800;
}

.quick-action__icon--expense { color: var(--warning-700); background: var(--warning-100); }
.quick-action__icon--split { color: var(--violet-700); background: var(--violet-100); }

.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .7rem;
    margin-bottom: 1rem;
}

.summary-strip > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.summary-strip span {
    margin-bottom: .28rem;
    color: var(--ink-500);
    font-size: .65rem;
    font-weight: 650;
}

.summary-strip strong {
    overflow: hidden;
    color: var(--ink-900);
    font-size: 1rem;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .55rem;
    margin-bottom: .8rem;
}

/* Formulários e tabelas — compartilhados pelas demais telas */
.form-stack {
    display: grid;
    gap: 1rem;
}

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

.col-12,
.field--span-full,
.field--full { grid-column: 1 / -1; }
.col-8 { grid-column: span 3; }
.col-6,
.field--span-2 { grid-column: span 2; }
.col-4,
.col-3 { grid-column: span 1; }

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

.field {
    min-width: 0;
}

.field label,
.field__label-row label,
.field > span {
    display: block;
    margin-bottom: .4rem;
    color: var(--ink-800);
    font-size: .76rem;
    font-weight: 680;
}

.field__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.field__label-row a {
    margin-bottom: .4rem;
    font-size: .7rem;
    font-weight: 650;
}

.field input,
.field select,
.field textarea,
.form-control {
    width: 100%;
    min-height: 42px;
    padding: .62rem .72rem;
    color: var(--ink-900);
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: 9px;
    outline: none;
    font-size: .8rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

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

.field input::placeholder,
.field textarea::placeholder {
    color: var(--ink-400);
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.form-control:hover {
    border-color: var(--ink-300);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.form-control:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(29, 143, 130, .12);
}

.field input[disabled],
.field select[disabled],
.field textarea[disabled] {
    color: var(--ink-500);
    cursor: not-allowed;
    background: var(--ink-50);
}

.input-with-icon {
    position: relative;
}

.input-with-icon > svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: .75rem;
    width: 18px;
    height: 18px;
    color: var(--ink-400);
    pointer-events: none;
    transform: translateY(-50%);
}

.input-with-icon > input {
    padding-left: 2.45rem;
}

.input-with-icon > .password-toggle + input,
.input-with-icon > input:has(+ .password-toggle) {
    padding-right: 2.6rem;
}

.input-with-icon.has-error input,
.field .has-error,
.field input[aria-invalid="true"] {
    border-color: var(--danger-600);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: .45rem;
    display: grid;
    width: 33px;
    height: 33px;
    padding: 0;
    place-items: center;
    color: var(--ink-500);
    background: transparent;
    border: 0;
    border-radius: 8px;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--brand-700);
    background: var(--brand-50);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.field-help,
.field-error,
.field-hint {
    display: block;
    margin-top: .32rem;
    color: var(--ink-500);
    font-size: .65rem;
}

.field-error {
    color: var(--danger-700);
}

.password-requirements {
    padding: .78rem .88rem;
    color: var(--ink-700);
    background: var(--brand-50);
    border: 1px solid rgba(29, 143, 130, .22);
    border-radius: 9px;
    font-size: .7rem;
}

.password-requirements strong {
    display: block;
    margin-bottom: .38rem;
    color: var(--ink-900);
    font-size: .76rem;
}

.password-requirements ul {
    display: grid;
    gap: .2rem;
    padding-left: 1.1rem;
    margin: 0;
}

.form-alert {
    display: flex;
    flex-direction: column;
    padding: .72rem .82rem;
    margin-bottom: 1rem;
    color: var(--danger-700);
    background: var(--danger-100);
    border: 1px solid #efc9cb;
    border-radius: 9px;
    font-size: .72rem;
}

.form-alert strong { margin-bottom: .15rem; }

.form-section {
    padding: 0;
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.entity-form,
.settings-stack {
    display: grid;
    gap: 1rem;
}

.form-section > .form-grid,
.form-section > .field,
.form-section > form,
.form-section > .distribution-list,
.form-section > p,
.form-section > .notice {
    margin: 0;
    padding: 1.15rem 1.2rem;
}

.form-section > form > .form-grid {
    margin-bottom: 1rem;
}

.form-section__header {
    margin-bottom: 1.15rem;
    padding-bottom: .8rem;
    border-bottom: 1px solid var(--ink-100);
}

.form-section__header p {
    margin: .2rem 0 0;
    color: var(--ink-500);
    font-size: .72rem;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ink-100);
}

.entity-form > .form-actions,
.settings-stack > .form-actions,
.form-card > .form-actions {
    padding: 1rem 0 0;
}

.form-card {
    padding: 1.2rem;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ink-100);
}

.section-heading h2 { margin-bottom: .2rem; }
.section-heading p { margin: 0; color: var(--ink-500); font-size: .72rem; }

.switch-row {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .8rem;
    background: var(--ink-50);
    border: 1px solid var(--ink-150);
    border-radius: 10px;
    cursor: pointer;
}

.switch-row input {
    width: 38px;
    height: 21px;
    flex: 0 0 38px;
    margin: .05rem 0 0;
    accent-color: var(--brand-600);
}

.switch-row > span {
    display: flex;
    flex-direction: column;
}

.switch-row strong { font-size: .76rem; }
.switch-row small { margin-top: .15rem; color: var(--ink-500); font-size: .65rem; }

.filter-panel {
    padding: .9rem;
    margin-bottom: 1rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .65rem;
}

.filter-form .field {
    min-width: 145px;
    flex: 0 1 190px;
}

.filter-form .field--grow {
    min-width: min(270px, 100%);
    flex: 1 1 310px;
}

.filter-form__actions {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding-bottom: 1px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
}

.data-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    font-size: .75rem;
}

.data-table th,
.data-table td {
    padding: .72rem .85rem;
    border-bottom: 1px solid var(--ink-100);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--ink-600);
    background: var(--ink-50);
    font-size: .64rem;
    font-weight: 760;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfc; }
.data-table .is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .actions { width: 1%; text-align: right; white-space: nowrap; }

.data-table td > small,
.table-responsive td > small {
    display: block;
    max-width: 360px;
    margin-top: .18rem;
    overflow: hidden;
    color: var(--ink-500);
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-panel {
    overflow: hidden;
}

.data-panel > .table-wrap {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.table-actions,
.text-right {
    text-align: right !important;
}

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

.table-actions form {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: .15rem 0 .15rem .2rem;
}

.table-actions form input:not([type="hidden"]) {
    width: 165px;
    min-height: 34px;
    padding: .4rem .55rem;
    border: 1px solid var(--ink-200);
    border-radius: 8px;
    font-size: .68rem;
}

.muted { color: var(--ink-500); font-size: .7rem; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    color: var(--ink-500);
    font-size: .7rem;
}

.pagination__links {
    display: flex;
    gap: .3rem;
}

.pagination__links a,
.pagination__links span {
    display: grid;
    min-width: 33px;
    height: 33px;
    padding: 0 .35rem;
    place-items: center;
    color: var(--ink-700);
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: 8px;
}

.pagination__links .is-current {
    color: #fff;
    background: var(--brand-700);
    border-color: var(--brand-700);
}

.pagination > a,
.pagination > span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: .45rem .7rem;
    color: var(--ink-700);
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: 8px;
}

.pagination > span {
    color: var(--ink-500);
    background: transparent;
    border-color: transparent;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .7rem;
    padding: .85rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.filter-bar .field { min-width: 150px; flex: 1; }

.table-card {
    overflow: hidden;
}

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

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    font-size: .75rem;
}

.table-responsive th,
.table-responsive td {
    padding: .72rem .85rem;
    border-bottom: 1px solid var(--ink-100);
    text-align: left;
    vertical-align: middle;
}

.table-responsive th {
    color: var(--ink-600);
    background: var(--ink-50);
    font-size: .64rem;
    font-weight: 760;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-responsive tbody tr:last-child td { border-bottom: 0; }
.table-responsive tbody tr:hover { background: #fbfcfc; }

.status-badge {
    display: inline-flex;
    padding: .2rem .48rem;
    color: var(--ink-600);
    background: var(--ink-100);
    border-radius: 999px;
    font-size: .58rem;
    font-weight: 750;
}

.status-badge--success { color: var(--success-700); background: var(--success-100); }
.status-badge--muted { color: var(--ink-600); background: var(--ink-100); }

.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.15rem;
    margin-top: 1rem;
    color: var(--ink-800);
    background: #fffafa;
    border: 1px solid #f1ced0;
    border-radius: var(--radius-md);
}

.danger-zone strong { color: var(--danger-700); font-size: .8rem; }
.danger-zone p { margin: .15rem 0 0; color: var(--ink-500); font-size: .68rem; }
.danger-zone .field { margin-top: .7rem; }

.form-note {
    padding: .7rem .8rem;
    color: var(--ink-600);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: 9px;
    font-size: .7rem;
}

/* Autenticação */
.auth-shell {
    color: var(--ink-900);
    background: #edf3f1;
}

.auth-shell__decoration {
    position: fixed;
    width: 430px;
    height: 430px;
    content: "";
    right: -190px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(29, 143, 130, .16), transparent 67%);
    pointer-events: none;
}

.auth-container {
    display: grid;
    width: min(1060px, calc(100% - 2rem));
    min-height: min(690px, calc(100vh - 3rem));
    grid-template-columns: minmax(370px, .92fr) minmax(420px, 1.08fr);
    margin: 1.5rem auto;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(17, 74, 68, .09);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    min-height: 100%;
    justify-content: space-between;
    flex-direction: column;
    padding: 2.15rem;
    overflow: hidden;
    color: rgba(255, 255, 255, .76);
    background:
        radial-gradient(circle at 95% 4%, rgba(77, 191, 175, .25), transparent 31%),
        radial-gradient(circle at 15% 96%, rgba(212, 147, 53, .18), transparent 29%),
        linear-gradient(145deg, var(--brand-950), #0e4a43);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.auth-brand-panel::before {
    width: 320px;
    height: 320px;
    right: -210px;
    bottom: 35px;
}

.auth-brand-panel::after {
    width: 190px;
    height: 190px;
    right: -125px;
    bottom: 100px;
}

.auth-brand-panel__copy {
    position: relative;
    z-index: 1;
    max-width: 360px;
    margin-top: clamp(5.5rem, 15vh, 9rem);
}

.auth-brand-panel__copy h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2rem, 3.7vw, 2.75rem);
    letter-spacing: -.045em;
}

.auth-brand-panel__copy > p:last-child {
    max-width: 320px;
    margin: 0;
    color: rgba(255, 255, 255, .64);
    font-size: .9rem;
}

.auth-brand-panel__footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, .38);
    font-size: .68rem;
}

.auth-card-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: clamp(2rem, 5vw, 4.5rem);
    background: #fff;
}

.auth-mobile-brand {
    display: none;
}

.auth-card,
.auth-flashes,
.auth-copyright {
    width: min(100%, 390px);
}

.auth-flashes {
    margin-bottom: .7rem;
}

.auth-flashes:empty { display: none; }

.auth-flashes .flash {
    box-shadow: none;
}

.auth-card__header {
    margin-bottom: 1.5rem;
}

.auth-card__header h2 {
    margin-bottom: .5rem;
    font-size: 1.6rem;
}

.auth-card__header > p:last-child {
    margin-bottom: 0;
    color: var(--ink-500);
    font-size: .8rem;
}

.auth-help,
.auth-copyright {
    color: var(--ink-500);
    font-size: .67rem;
    text-align: center;
}

.auth-help {
    margin: 1.2rem 0 0;
}

.auth-copyright {
    margin: 2rem 0 0;
}

.auth-card .back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.4rem;
    font-size: .72rem;
    font-weight: 700;
}

/* Erros */
.error-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 90% 10%, rgba(29, 143, 130, .1), transparent 30%),
        var(--page);
}

.error-container {
    width: min(560px, 100%);
}

.error-container > .brand {
    display: flex;
    width: max-content;
    margin: 0 auto 1.4rem;
}

.error-card {
    position: relative;
    padding: clamp(1.6rem, 5vw, 3.2rem);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ink-150);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.error-code {
    position: absolute;
    top: -1.2rem;
    right: .5rem;
    margin: 0;
    color: var(--ink-50);
    font-size: 6.5rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.08em;
    pointer-events: none;
}

.error-icon {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    margin: 0 auto 1rem;
    color: var(--gold-600);
    background: var(--warning-100);
    border-radius: 16px;
}

.error-icon svg { width: 29px; height: 29px; }

.error-card h1 {
    position: relative;
    margin-bottom: .7rem;
    font-size: 1.55rem;
}

.error-card > p:not(.error-code) {
    position: relative;
    max-width: 410px;
    margin: 0 auto;
    color: var(--ink-600);
    font-size: .82rem;
}

.error-card > small {
    display: block;
    margin-top: .7rem;
    color: var(--ink-400);
    font-size: .62rem;
}

.error-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    margin-top: 1.5rem;
}

/* Repasses, fundo de reserva e fechamentos */
.distribution-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.percentage-total {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: .28rem .58rem;
    color: var(--success-700);
    background: var(--success-100);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 780;
}

.percentage-total.is-invalid {
    color: var(--danger-700);
    background: var(--danger-100);
}

.input-suffix {
    display: flex;
    align-items: stretch;
}

.input-suffix input {
    min-width: 0;
    border-radius: 9px 0 0 9px;
}

.input-suffix > span {
    display: grid;
    min-width: 42px;
    place-items: center;
    margin: 0;
    color: var(--ink-600);
    background: var(--ink-50);
    border: 1px solid var(--ink-200);
    border-left: 0;
    border-radius: 0 9px 9px 0;
    font-size: .75rem;
    font-weight: 700;
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .72rem .8rem;
    background: var(--ink-50);
    border: 1px solid var(--ink-150);
    border-radius: 10px;
    cursor: pointer;
}

.checkbox-field:hover {
    border-color: var(--ink-300);
}

.checkbox-field input {
    width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin: .1rem 0 0;
    accent-color: var(--brand-600);
}

.checkbox-field > span {
    margin: 0;
    color: var(--ink-700);
    font-size: .72rem;
    font-weight: 500;
}

.checkbox-field strong {
    color: var(--ink-900);
}

.form-card > .empty-state {
    min-height: 76px;
    padding: .9rem;
    margin-bottom: 1rem;
    background: var(--ink-50);
    border: 1px dashed var(--ink-200);
    border-radius: 10px;
    font-size: .72rem;
}

.calculation-card {
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
}

.calculation-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
    color: var(--ink-700);
    border-bottom: 1px solid var(--ink-100);
    font-size: .78rem;
}

.calculation-line strong {
    color: var(--ink-900);
    white-space: nowrap;
}

.calculation-line--minus strong {
    color: var(--danger-700);
}

.calculation-line--total {
    padding-top: .8rem;
    border-bottom: 0;
    font-size: .9rem;
    font-weight: 750;
}

.calculation-line--total strong {
    color: var(--brand-800);
    font-size: 1.05rem;
}

.callout {
    padding: .72rem .8rem;
    margin-top: .8rem;
    border-radius: 9px;
    font-size: .72rem;
}

.callout--warning {
    color: var(--warning-700);
    background: var(--warning-100);
    border: 1px solid #efd6aa;
}

.allocation-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.allocation-card {
    display: flex;
    min-height: 132px;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
    border-top: 4px solid var(--brand-600);
}

.allocation-card--sergio { border-top-color: var(--violet-700); }
.allocation-card--office { border-top-color: var(--blue-700); }
.allocation-card--reserve { border-top-color: var(--gold-500); }

.allocation-card > span {
    color: var(--ink-600);
    font-size: .68rem;
    font-weight: 700;
}

.allocation-card > strong {
    margin: .3rem 0;
    color: var(--ink-950);
    font-size: 1.16rem;
    letter-spacing: -.025em;
}

.allocation-card > small {
    color: var(--ink-500);
    font-size: .63rem;
}

.action-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.1rem 1.2rem;
    margin-bottom: 1rem;
}

.action-panel h2 { margin-bottom: .15rem; }
.action-panel p { margin: 0; color: var(--ink-500); font-size: .72rem; }

.action-panel__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
}

.action-panel form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .55rem;
}

.action-panel form .field {
    min-width: min(320px, 100%);
}

.settlement-row {
    display: grid;
    grid-template-columns: minmax(230px, .85fr) minmax(480px, 2.15fr);
    align-items: center;
    gap: 1rem;
    padding: .95rem 0;
    border-bottom: 1px solid var(--ink-100);
}

.settlement-row:last-child { border-bottom: 0; }

.settlement-row > div:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.settlement-row > div:first-child > strong {
    color: var(--ink-900);
    font-size: .82rem;
}

.settlement-row > div:first-child > span {
    margin-top: .22rem;
    color: var(--ink-500);
    font-size: .65rem;
}

.inline-payment-form {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(105px, .7fr) minmax(165px, 1fr) minmax(150px, 1fr) minmax(135px, 1fr) auto;
    align-items: end;
    gap: .55rem;
}

.inline-payment-form .field > span {
    font-size: .65rem;
}

.inline-payment-form .field input,
.inline-payment-form .field select {
    min-height: 38px;
    padding: .5rem .58rem;
    font-size: .72rem;
}

.reserve-hero {
    position: relative;
    display: flex;
    min-height: 165px;
    justify-content: center;
    flex-direction: column;
    padding: 1.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    color: rgba(255, 255, 255, .78);
    background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.reserve-hero::after {
    position: absolute;
    width: 220px;
    height: 220px;
    content: "";
    right: -70px;
    bottom: -125px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.reserve-hero > span {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.reserve-hero > strong {
    margin: .25rem 0;
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    letter-spacing: -.04em;
}

.reserve-hero > p {
    max-width: 560px;
    margin: 0;
    font-size: .72rem;
}

.table-row-link { cursor: pointer; }
.table-row-link:hover { background: var(--brand-50) !important; }

.count-badge {
    display: inline-grid;
    min-width: 30px;
    min-height: 30px;
    place-items: center;
    padding: .2rem .55rem;
    color: var(--brand-800);
    background: var(--brand-100);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
}

.form-button-field {
    align-self: end;
}

.action-panel--danger {
    border-color: var(--danger-100);
    background: linear-gradient(135deg, #fff, var(--danger-100));
}

.status-badge--pending,
.status-badge--open,
.status-badge--reopened,
.status-badge--warning { color: var(--warning-700); background: var(--warning-100); }
.status-badge--approved,
.status-badge--closed { color: var(--success-700); background: var(--success-100); }
.status-badge--cancelled { color: var(--danger-700); background: var(--danger-100); }
.status-badge--draft,
.status-badge--calculated { color: var(--blue-700); background: var(--blue-100); }

/* Responsividade */
@media (max-width: 1380px) {
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-card__detail { min-height: auto; }
}

@media (max-width: 1120px) {
    .dashboard-grid--primary { grid-template-columns: minmax(0, 1.45fr) minmax(285px, .85fr); }
    .distribution-visual { grid-template-columns: 1fr; }
    .donut-chart { width: 132px; }
    .quick-actions { align-items: flex-start; flex-direction: column; }
    .quick-actions__links { width: 100%; justify-content: flex-start; }
    .quick-actions__links > a { flex: 1; }
    .allocation-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settlement-row { grid-template-columns: 1fr; }
    .inline-payment-form { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
    .inline-payment-form .button { grid-column: 1 / -1; justify-self: end; }
}

@media (max-width: 980px) {
    :root { --sidebar-width: 278px; }

    .sidebar {
        box-shadow: 18px 0 48px rgba(5, 28, 25, .24);
        transform: translateX(-105%);
        transition: transform .22s cubic-bezier(.22, .75, .28, 1);
    }

    .sidebar__close { display: inline-grid !important; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-scrim { display: block; opacity: 1; }
    .app-main { margin-left: 0; }
    .topbar__menu { display: inline-grid !important; }
    .topbar-avatar { display: grid; }
    .dashboard-grid--primary { grid-template-columns: 1fr; }
    .distribution-visual { grid-template-columns: minmax(135px, .8fr) minmax(180px, 1.2fr); }
    .auth-container { width: min(920px, calc(100% - 2rem)); grid-template-columns: minmax(330px, .85fr) minmax(390px, 1.15fr); }
}

@media (max-width: 760px) {
    .topbar { min-height: 62px; }
    .topbar__welcome { display: none; }
    .topbar__actions .button span { display: none; }
    .topbar__actions .button { width: 38px; padding: 0; }
    .page { padding-top: 1.15rem; }
    .page-header { align-items: flex-start; flex-direction: column; }
    .page-header__actions { width: 100%; justify-content: flex-start; }
    .period-picker { margin-left: auto; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid--due { grid-template-columns: 1fr; }
    .bar-chart { height: 235px; padding-right: .8rem; padding-left: .8rem; overflow-x: auto; }
    .bar-chart::before { right: .8rem; left: .8rem; }
    .bar-chart__plot { min-width: 500px; }
    .app-footer { align-items: center; flex-direction: column; gap: .25rem; }
    .form-grid { grid-template-columns: 1fr; }
    .field--span-2 { grid-column: 1 / -1; }
    .distribution-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .action-panel { align-items: stretch; flex-direction: column; }
    .action-panel__buttons { justify-content: flex-start; }
    .inline-payment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inline-payment-form .button { width: 100%; justify-self: stretch; }
    .col-12, .col-8, .col-6, .col-4, .col-3 { grid-column: span 1; }
    .auth-container { display: block; width: min(540px, calc(100% - 1.25rem)); min-height: auto; margin: .625rem auto; }
    .auth-brand-panel { display: none; }
    .auth-card-wrap { min-height: calc(100vh - 1.25rem); padding: clamp(1.5rem, 8vw, 3.4rem); }
    .auth-mobile-brand { display: flex; align-items: center; gap: .75rem; width: min(100%, 390px); margin-bottom: 3.2rem; }
}

@media (max-width: 520px) {
    .topbar { padding-right: .75rem; padding-left: .75rem; }
    .page { padding-right: .75rem; padding-left: .75rem; }
    .page-header__actions > .button { flex: 1; }
    .period-picker { margin-left: 0; }
    .period-picker input { width: 132px; }
    .metric-grid { gap: .6rem; }
    .metric-card { padding: .85rem; }
    .metric-card__top { margin-bottom: .62rem; }
    .metric-card__top p { white-space: normal; }
    .metric-card__value { font-size: 1.08rem; }
    .metric-card__detail { font-size: .58rem; }
    .panel__header { padding-right: .9rem; padding-left: .9rem; }
    .chart-legend { gap: .5rem; }
    .distribution-visual { grid-template-columns: 1fr; }
    .due-item { grid-template-columns: 4px minmax(0, 1fr) auto; gap: .55rem; padding-right: .75rem; padding-left: .75rem; }
    .due-item__chevron { display: none; }
    .due-item__amount > strong { font-size: .67rem; }
    .quick-actions__links { flex-direction: column; }
    .quick-actions__links > a { width: 100%; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .distribution-grid,
    .allocation-cards,
    .inline-payment-form { grid-template-columns: 1fr; }
    .action-panel form,
    .action-panel__buttons { align-items: stretch; flex-direction: column; }
    .action-panel form .button,
    .action-panel__buttons .button { width: 100%; }
    .auth-card-wrap { min-height: calc(100vh - 1.25rem); padding: 1.4rem; }
    .auth-mobile-brand { margin-bottom: 2.4rem; }
    .auth-card__header h2 { font-size: 1.4rem; }
}

.admin-password-reset {
    margin-top: 1.25rem;
}

.audit-metadata {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: .25rem 1.2rem 1.2rem;
}

.audit-metadata > div {
    min-width: 0;
    padding: .85rem .75rem;
    border-bottom: 1px solid var(--ink-100);
}

.audit-metadata dt {
    margin-bottom: .25rem;
    color: var(--ink-500);
    font-size: .62rem;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.audit-metadata dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--ink-800);
    font-size: .75rem;
}

.audit-metadata dd small {
    display: block;
    margin-top: .2rem;
    color: var(--ink-500);
    font-size: .62rem;
}

.audit-metadata .audit-metadata__wide {
    grid-column: 1 / -1;
}

.audit-user-agent {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .65rem !important;
}

.audit-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.audit-json {
    min-width: 0;
    overflow: hidden;
}

.audit-json pre {
    max-height: 620px;
    padding: 1rem 1.15rem;
    margin: 0;
    overflow: auto;
    color: var(--ink-800);
    background: var(--ink-50);
    font: .68rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    tab-size: 2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .audit-metadata,
    .audit-comparison {
        grid-template-columns: 1fr;
    }

    .audit-metadata .audit-metadata__wide {
        grid-column: auto;
    }
}

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

@media print {
    :root { --page: #fff; }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    @page { size: A4 landscape; margin: 12mm; }

    body {
        color: #111;
        background: #fff;
        font-size: 9pt;
    }

    .sidebar,
    .topbar,
    .app-footer,
    .flash-region,
    .no-print,
    .quick-actions {
        display: none !important;
    }

    .app-main { margin: 0; }
    .page { max-width: none; padding: 0; }
    .page-header { margin-bottom: 8mm; }
    .page-header h1 { font-size: 18pt; }
    .metric-grid { grid-template-columns: repeat(3, 1fr); gap: 4mm; }
    .metric-card, .panel { break-inside: avoid; border: 1px solid #bbb; }
    .dashboard-grid--primary { grid-template-columns: 1.55fr 1fr; }
    .dashboard-grid--due { grid-template-columns: 1fr 1fr; }
    .bar-chart { height: 55mm; }
    .distribution-visual { min-height: 55mm; grid-template-columns: 1fr 1fr; }
    .donut-chart { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .bar, .legend-dot, .due-item__marker { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    a { color: inherit; text-decoration: none; }
}
