@import url('./tokens.css');
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font:
        15px/1.6 Inter,
        'Segoe UI',
        Arial,
        sans-serif;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    outline-offset: 4px;
}
button {
    cursor: pointer;
}
a {
    color: inherit;
    text-decoration: none;
}
button:disabled {
    opacity: 0.5;
    cursor: wait;
}
h1,
h2,
h3,
p {
    margin: 0;
}
h1,
h2,
h3 {
    line-height: 1.15;
    letter-spacing: -0.04em;
}
p {
    color: var(--muted);
}
img {
    max-width: 100%;
}
em {
    font-family: Georgia, serif;
    font-weight: 400;
}
button {
    border: 0;
}
input,
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    min-height: 44px;
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #81a4c5;
    border-color: var(--primary);
}
select[multiple] {
    min-height: 112px;
    font-size: 13px;
}
option {
    padding: 5px 8px;
}
label {
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
textarea {
    min-height: 100px;
}
input[type='checkbox'] {
    width: 18px;
    min-height: 18px;
    height: 18px;
    accent-color: var(--primary);
}
.skip {
    position: absolute;
    top: -100px;
    left: 20px;
    background: white;
    padding: 14px;
    z-index: 1000;
}
.skip:focus {
    top: 0;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    background: var(--primary);
    color: white;
    padding: 14px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    min-height: 46px;
    transition:
        background 0.2s,
        transform 0.2s;
}
.button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}
.button.small {
    padding: 10px 16px;
    min-height: 40px;
    gap: 18px;
}
.button.secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
}
.button.secondary:hover {
    background: #f0f5f8;
}
.button.gold {
    background: var(--gold);
    color: #243044;
}
.button.danger {
    background: #b93838;
}
.full {
    width: 100%;
}
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}
.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #6c7f88;
}
.eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.brand > span {
    font-size: 23px;
    letter-spacing: 0.14em;
    line-height: 1.1;
    color: var(--primary);
    font-weight: 600;
}
.brand small {
    display: block;
    font-size: 8px;
    letter-spacing: 0.25em;
    margin-top: 5px;
}
.brand.light > span {
    color: white;
}
.muted {
    color: var(--muted);
}
.narrow {
    max-width: 850px !important;
}
.narrow h1 {
    font-size: 48px;
    margin: 24px 0;
}
.narrow h2 {
    margin: 35px 0 15px;
}
.narrow p {
    margin: 15px 0;
}
.site-header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: auto;
    padding: 0 48px;
    border-bottom: 1px solid #e3e7e6;
    gap: 24px;
}
.site-header nav {
    display: flex;
    gap: 30px;
    font-size: 12px;
    color: #617078;
}
.institutional {
    background: #fbfcf9;
}
.hero {
    max-width: 1280px;
    padding: 50px 48px 62px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 56px;
    align-items: center;
}
.hero h1 {
    font-size: clamp(46px, 5.4vw, 76px);
    font-weight: 500;
    margin: 26px 0;
    color: #243e51;
    line-height: 1.07;
}
.hero h1 em {
    color: #58725f;
}
.hero p {
    font-size: 15px;
    line-height: 1.9;
}
.hero-actions {
    display: flex;
    gap: 24px;
    align-items: center;
    margin: 30px 0 38px;
}
.hero-actions .text-link {
    font-size: 12px;
    gap: 12px;
}
.hero-note {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: #7e8988;
    line-height: 1.65;
}
.hero-note strong {
    font-weight: 500;
    color: #43594f;
}
.round-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: #edf1e9;
    border-radius: 50%;
    font-size: 23px;
    color: #6a8068;
}
.hero-art {
    position: relative;
    background: #e8eeed;
    border-radius: 180px 180px 12px 12px;
    overflow: hidden;
    min-height: 510px;
}
.hero-art > img {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 510px;
}
.art-label {
    position: absolute;
    left: 28px;
    top: 35px;
    font-size: 8px;
    letter-spacing: 0.14em;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1;
    background: #ffffffde;
    padding: 9px 12px;
    border-radius: 40px;
}
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #64866b;
    border-radius: 50%;
}
.art-caption {
    position: absolute;
    bottom: 22px;
    left: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffffed;
    border: 1px solid white;
    border-radius: 8px;
    padding: 16px 18px;
    color: #3b5449;
}
.art-caption > span:first-child {
    font-size: 26px;
    letter-spacing: 0.16em;
    font-weight: 500;
}
.art-caption > span:last-child {
    font-size: 10px;
    line-height: 1.5;
}
.values-strip {
    border-top: 1px solid #e3e7e0;
    border-bottom: 1px solid #e3e7e0;
    display: flex;
    justify-content: center;
    gap: 70px;
    padding: 25px;
    font-size: 12px;
    color: #526054;
}
.values-strip b {
    font-weight: 400;
    font-size: 10px;
    color: #a29b81;
    margin-right: 10px;
}
.section {
    max-width: 1280px;
    margin: auto;
    padding: 90px 48px;
}
.section h2 {
    font-size: 42px;
    font-weight: 500;
    color: #294338;
}
.section h2 em {
    color: #788c78;
}
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}
.split h2 {
    margin-top: 22px;
}
.split .lead {
    font-size: 20px;
    color: #445a4e;
    line-height: 1.6;
    margin-bottom: 20px;
}
.split p {
    font-size: 14px;
    line-height: 1.9;
}
.split .text-link {
    margin-top: 25px;
    color: #4b6655;
}
.community {
    background: #edf1e9;
    max-width: none;
    padding-left: max(48px, calc((100vw - 1184px) / 2));
    padding-right: max(48px, calc((100vw - 1184px) / 2));
}
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 40px;
}
.section-heading h2 {
    margin-top: 20px;
}
.section-heading > p {
    font-size: 13px;
    line-height: 1.8;
    padding-bottom: 6px;
}
.principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 55px;
}
.principles article {
    border-top: 1px solid #c6cfc1;
    padding-top: 20px;
    position: relative;
}
.principle-number {
    font-size: 11px;
    color: #788a74;
}
.line-icon {
    font-size: 38px;
    font-weight: 300;
    color: #697e62;
    margin: 25px 0;
}
.principles h3 {
    font-weight: 500;
    font-size: 22px;
    margin-bottom: 18px;
    color: #334e3e;
}
.principles p {
    font-size: 13px;
    line-height: 1.9;
    max-width: 270px;
}
.portal-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
}
.portal-intro h2 {
    margin: 20px 0;
}
.portal-intro > p {
    max-width: 330px;
    font-size: 14px;
    margin-bottom: 28px;
}
.portal-features article {
    display: flex;
    gap: 22px;
    padding: 24px 0;
    border-bottom: 1px solid #e0e5de;
}
.portal-features article:first-child {
    padding-top: 0;
}
.portal-features article > span {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: 1px solid #d5ded2;
    border-radius: 12px;
    font-size: 24px;
    color: #71856d;
}
.portal-features h3 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: #344f3e;
}
.portal-features p {
    font-size: 12px;
    line-height: 1.8;
}
.access-banner {
    margin: 0 max(48px, calc((100vw - 1184px) / 2)) 80px;
    padding: 48px 55px;
    background: #274c5b;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}
.access-banner h2 {
    color: white;
    font-weight: 400;
    font-size: 30px;
    margin: 15px 0;
}
.access-banner p {
    color: #d3dedc;
    font-size: 13px;
}
.access-banner .eyebrow {
    color: #d6aa65;
}
.site-footer {
    border-top: 1px solid #dfe5dd;
    padding: 38px max(48px, calc((100vw - 1184px) / 2));
    display: flex;
    gap: 45px;
    align-items: center;
    justify-content: space-between;
}
.site-footer p {
    font-size: 11px;
    color: #3f5449;
}
.site-footer p span {
    color: #849081;
}
.site-footer > div {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    font-size: 11px;
}
.site-footer small {
    width: 100%;
    font-size: 10px;
    color: #8b9487;
    text-align: right;
}
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100dvh;
}
.auth-visual {
    position: relative;
    background: #23465b;
    padding: 50px 64px;
    color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 780px;
}
.auth-visual > .brand {
    position: relative;
    z-index: 1;
}
.auth-visual > div {
    position: relative;
    z-index: 1;
    margin: 60px 0 200px;
}
.auth-visual h1 {
    font-size: 60px;
    font-weight: 400;
    line-height: 1.15;
    margin: 22px 0;
}
.auth-visual h1 em {
    color: #d6b77b;
}
.auth-visual .eyebrow {
    color: #b2c6c8;
}
.auth-visual p {
    color: #c1d2d8;
    font-size: 14px;
}
.auth-building {
    position: absolute;
    width: 380px;
    right: -40px;
    bottom: 0;
    opacity: 0.2;
    border-radius: 180px 180px 0 0;
}
.auth-footer {
    font-size: 9px;
    letter-spacing: 0.18em;
    color: #a3bfc5;
    z-index: 1;
}
.auth-form-wrap {
    padding: 50px 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fbfcfe;
}
.auth-form {
    width: 100%;
    max-width: 380px;
    margin: 65px auto;
}
.auth-form h2 {
    font-size: 42px;
    font-weight: 500;
    color: #24465e;
    margin: 18px 0;
}
.auth-form > p {
    font-size: 13px;
    margin-bottom: 28px;
}
.auth-form form {
    display: grid;
    gap: 18px;
}
.auth-form input {
    padding: 14px;
}
.channel-choice {
    border: 0;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.channel-choice legend {
    font-size: 12px;
    font-weight: 600;
    color: #24465e;
    margin-bottom: 8px;
}
.channel-choice label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #d4dee6;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}
.channel-choice label:has(input:checked) {
    border-color: #24465e;
    box-shadow: 0 0 0 1px #24465e inset;
}
.channel-choice input {
    width: auto;
    padding: 0;
    margin: 0;
    accent-color: #24465e;
}
.auth-form form > .auth-help {
    margin-top: -8px;
}
.forgot {
    justify-self: end;
    font-size: 12px;
    margin: -6px 0 5px;
}
.auth-help {
    font-size: 11px !important;
    text-align: center;
    margin-top: 22px;
}
.privacy-note {
    border-top: 1px solid #e0e7ec;
    margin-top: 32px;
    padding-top: 22px;
    display: flex;
    gap: 14px;
    align-items: center;
}
.privacy-note > span {
    font-size: 28px;
    color: #8ba0b1;
}
.privacy-note p {
    font-size: 10px;
    line-height: 1.8;
}
.auth-form-wrap > .muted {
    font-size: 11px;
    text-align: center;
}
#auth-message {
    margin-top: 16px;
    font-size: 13px;
    color: #9b5a24;
}
.workspace {
    background: #f6f8fb;
    font-size: 13px;
}
.sidebar {
    width: 238px;
    position: fixed;
    inset: 0 auto 0 0;
    background: #203e5d;
    color: #c8d6e5;
    display: flex;
    flex-direction: column;
    padding: 30px 17px 0;
    z-index: 30;
}
.sidebar .brand {
    padding: 0 10px;
}
.workspace-label {
    font-size: 8px;
    letter-spacing: 0.18em;
    color: #8ca2bc;
    margin: 34px 13px 12px;
}
.sidebar nav {
    overflow: auto;
    flex: 1;
    padding-bottom: 20px;
    scrollbar-width: thin;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 3px 0;
    border-radius: 7px;
    color: #b9ccdf;
    font-size: 12px;
    min-height: 40px;
}
.nav-link:hover {
    background: #ffffff09;
}
.nav-link.active {
    background: #375873;
    color: white;
}
.nav-link.active:before {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    height: 22px;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
}
.nav-icon {
    font-size: 18px;
    line-height: 1;
    width: 22px;
    text-align: center;
    color: #9ab0c8;
}
.nav-link.active .nav-icon {
    color: #ddbd86;
}
.nav-section {
    font-size: 8px;
    letter-spacing: 0.16em;
    color: #829bb8;
    margin: 24px 15px 8px;
}
.sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 6px;
    border-top: 1px solid #ffffff15;
}
.side-avatar,
.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: #f4e9d6;
    color: #6e5631;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}
.sidebar-bottom strong {
    font-size: 10px;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 125px;
    color: #e6edf4;
}
.sidebar-bottom small {
    font-size: 9px;
    display: block;
    color: #91a6bd;
}
.sidebar-bottom .icon-button {
    color: #a8bfd4;
    margin-left: auto;
}
.workspace-main {
    margin-left: 238px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
.topbar {
    height: 76px;
    border-bottom: 1px solid #e4e9f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    gap: 20px;
}
.breadcrumb {
    font-size: 11px;
    color: #94a0b0;
    display: flex;
    gap: 13px;
}
.breadcrumb b {
    font-weight: 500;
    color: #536377;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}
.topbar-right select {
    border: 0;
    font-size: 11px;
    max-width: 230px;
    color: #4d6176;
    min-height: 30px;
}
.topbar-date {
    font-size: 10px;
    color: #8a97a6;
}
.avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
}
.icon-button {
    background: transparent;
    color: #6d7f90;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    font-size: 22px;
    flex-shrink: 0;
}
.icon-button:hover {
    background: #8aa4bb20;
}
.menu-button {
    display: none;
}
#content {
    padding: 34px 36px 50px;
    flex: 1;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    outline: none;
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}
.page-head h1 {
    font-size: 28px;
    color: #263e55;
    font-weight: 600;
    letter-spacing: -0.04em;
}
.page-head p {
    font-size: 12px;
    margin-top: 8px;
    color: #8090a1;
}
.page-head .eyebrow {
    font-size: 9px;
    letter-spacing: 0.14em;
    margin-bottom: 10px;
}
.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.app-footer {
    padding: 16px 36px;
    border-top: 1px solid #e3e9f0;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #99a4af;
}
.app-footer a {
    color: #7e8c9c;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 26px;
}
.stat {
    background: white;
    border: 1px solid #e3e9f0;
    border-radius: 11px;
    padding: 20px;
    min-width: 0;
}
.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8292a2;
    font-size: 11px;
    gap: 8px;
}
.stat-icon {
    width: 30px;
    height: 30px;
    background: #eef3f9;
    border-radius: 9px;
    color: #587897;
    display: grid;
    place-items: center;
    font-size: 17px;
}
.stat strong {
    display: block;
    font-size: 26px;
    letter-spacing: -0.05em;
    font-weight: 600;
    color: #2e4b66;
    margin: 13px 0 5px;
}
.stat small {
    font-size: 9px;
    color: #96a2ae;
}
.stat.warm .stat-icon {
    background: #fff3dc;
    color: #a58142;
}
.stat.green .stat-icon {
    background: #eaf4ee;
    color: #5b8871;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 22px;
    margin: 24px 0;
}
.panel {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    overflow: hidden;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid #edf1f5;
}
.panel-head h2 {
    font-size: 15px;
    letter-spacing: -0.02em;
    color: #3c5066;
    font-weight: 600;
}
.panel-head p {
    font-size: 10px;
    margin-top: 6px;
}
.panel-body {
    padding: 22px;
}
.panel-head .text-link {
    font-size: 10px;
    gap: 10px;
}
.notice {
    display: flex;
    align-items: start;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid #ecddbd;
    background: #fff9ec;
    color: #856d40;
    border-radius: 9px;
    margin-bottom: 24px;
    font-size: 11px;
}
.notice strong {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
}
.notice p {
    color: #948466;
    font-size: 10px;
}
.notice.blue {
    border-color: #d6e4ef;
    background: #edf5fa;
    color: #466e8d;
}
.notice.blue p {
    color: #6f8ba0;
}
.notice-symbol {
    font-size: 18px;
    line-height: 1.4;
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.quick-action {
    padding: 18px;
    border: 1px solid #e2e8ef;
    border-radius: 9px;
    display: flex;
    gap: 12px;
    align-items: center;
    background: white;
}
.quick-action:hover {
    border-color: #9db5cb;
    background: #fcfdff;
}
.quick-action > span {
    color: #a78a58;
    font-size: 24px;
}
.quick-action h3 {
    font-size: 12px;
    letter-spacing: 0;
    font-weight: 600;
}
.quick-action p {
    font-size: 10px;
    margin-top: 4px;
}
.activity {
    display: flex;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid #edf1f5;
}
.activity:last-child {
    border: 0;
}
.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #f0f4f8;
    color: #67829d;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.activity h3 {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
}
.activity p {
    font-size: 10px;
    margin-top: 5px;
    color: #9aa6b3;
}
.bars {
    height: 220px;
    display: flex;
    align-items: end;
    gap: 15px;
    padding-top: 20px;
}
.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    height: 100%;
    min-width: 0;
}
.bar-value {
    font-size: 8px;
    color: #8192a4;
    margin-bottom: 8px;
}
.bar {
    width: min(42px, 100%);
    height: var(--bar);
    min-height: 3px;
    background: #b8c9da;
    border-radius: 4px 4px 0 0;
}
.bar-col:last-child .bar {
    background: #315b80;
}
.bar-label {
    font-size: 9px;
    color: #93a0ae;
    margin-top: 10px;
}
.chart-legend {
    margin-top: 20px;
    font-size: 9px;
    color: #95a3b1;
}
.chart-legend:before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #315b80;
    margin-right: 7px;
    border-radius: 2px;
}
.table-wrap {
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}
th {
    padding: 13px 16px;
    background: #fafbfd;
    font-size: 9px;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: #8796a6;
    border-bottom: 1px solid #e5ebf2;
}
td {
    padding: 15px 16px;
    font-size: 11px;
    border-bottom: 1px solid #edf1f5;
    color: #65788b;
}
td strong {
    font-weight: 600;
    color: #3d5269;
}
td small {
    display: block;
    font-size: 9px;
    color: #9ca8b5;
    margin-top: 4px;
}
tbody tr:hover {
    background: #fbfcfe;
}
tbody tr.selected {
    background: #f0f5fa;
}
.money {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 500;
    padding: 4px 8px;
    background: #edf2f7;
    color: #6d8194;
    border-radius: 5px;
    white-space: nowrap;
}
.tag.green {
    background: #eaf5ef;
    color: #438363;
}
.tag.amber {
    background: #fff4df;
    color: #a17b36;
}
.tag.red {
    background: #fceeed;
    color: #b5645e;
}
.tag.blue {
    background: #eaf2fb;
    color: #567fa7;
}
.table-button {
    font-size: 10px;
    font-weight: 600;
    color: #416a91;
    background: #edf3f9;
    border: 1px solid #dee8f1;
    border-radius: 6px;
    padding: 6px 10px;
    min-height: 32px;
    white-space: nowrap;
}
.table-button:hover {
    background: #dfeaf4;
}
.table-button.secondary {
    background: white;
    color: #7a8c9e;
}
.table-button.danger {
    color: #b45a54;
    background: #fff4f2;
}
.filters {
    padding: 21px;
    border-bottom: 1px solid #e6ecf3;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr 1.25fr 0.7fr 0.7fr;
    gap: 15px;
    align-items: start;
}
.filters label {
    font-size: 10px;
    color: #7d8fa1;
    font-weight: 500;
}
.filters input,
.filters select {
    font-size: 11px;
    padding: 8px 10px;
}
.filter-actions {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}
.filter-actions .checkbox-label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    font-size: 10px;
}
.filter-help {
    font-size: 9px;
    color: #99a5b2;
    margin-top: 6px;
}
.selection-toolbar {
    padding: 14px 20px;
    background: #edf3f9;
    border-bottom: 1px solid #dce7f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 3;
}
.selection-toolbar strong {
    color: #3f6284;
    font-size: 11px;
}
.selection-toolbar small {
    display: block;
    color: #8a9db1;
    font-size: 9px;
    margin-top: 3px;
}
.selection-actions {
    display: flex;
    gap: 9px;
}
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    font-size: 10px;
    color: #8a9bad;
    gap: 15px;
}
.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}
.empty {
    text-align: center;
    padding: 55px 25px;
    color: #9ba8b6;
}
.empty-icon {
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    background: #f0f4f8;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 28px;
    color: #91a8bb;
}
.empty h3 {
    font-size: 16px;
    font-weight: 500;
    color: #5f768c;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.empty p {
    font-size: 11px;
    max-width: 370px;
    margin: auto;
    line-height: 1.8;
}
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    gap: 15px;
    color: #8c9cae;
    font-size: 12px;
}
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #dfe8f0;
    border-top-color: #335d80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-grid .span-2 {
    grid-column: 1/-1;
}
.form-grid label {
    font-size: 11px;
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #edf1f5;
}
.form-hint {
    font-size: 10px;
    color: #98a4b2;
    margin-top: 12px;
}
.list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.unit-card {
    padding: 24px;
    background: white;
    border: 1px solid #e2e9f1;
    border-radius: 10px;
}
.unit-card .unit-no {
    font-size: 32px;
    letter-spacing: -0.05em;
    color: #375c7e;
    margin: 10px 0;
}
.unit-card p {
    font-size: 11px;
}
.unit-card footer {
    border-top: 1px solid #eaf0f5;
    padding-top: 14px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #97a6b4;
}
.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
}
.search-row input {
    max-width: 450px;
    font-size: 12px;
}
.search-row .button {
    font-size: 12px;
}
.document-list {
    display: grid;
    gap: 16px;
}
.document {
    padding: 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.document h2 {
    font-size: 18px;
    font-weight: 500;
    color: #3b5872;
    margin: 10px 0 15px;
}
.document time {
    font-size: 10px;
    color: #92a1b1;
}
.document .rich-text {
    font-size: 13px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.rich-text p {
    margin: 12px 0;
}
.rich-text table {
    white-space: normal;
}
.document footer {
    margin-top: 18px;
    border-top: 1px solid #e8edf3;
    padding-top: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.rich-text a {
    color: #356e9c;
    text-decoration: underline;
}
.toast-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 10px;
    z-index: 100;
    max-width: 420px;
}
.toast {
    background: #203e5d;
    color: white;
    padding: 14px 20px;
    border-radius: 9px;
    box-shadow: 0 8px 35px #15365325;
    font-size: 12px;
}
.toast.error {
    background: #96534d;
}
dialog {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 30px 100px #16304740;
    max-width: 850px;
    width: calc(100% - 40px);
    max-height: 90dvh;
    padding: 0;
    color: var(--text);
}
dialog::backdrop {
    background: #14283b70;
    backdrop-filter: blur(3px);
}
.dialog-head {
    position: sticky;
    top: 0;
    z-index: 4;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 23px 26px;
    border-bottom: 1px solid #e3eaf2;
}
.dialog-head h2 {
    font-size: 19px;
    font-weight: 600;
}
.dialog-head .icon-button {
    font-size: 28px;
}
#modal-body {
    padding: 25px 26px;
}
.dialog-summary {
    padding: 20px;
    background: #edf4fa;
    border: 1px solid #d6e5f1;
    border-radius: 9px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}
.dialog-summary strong {
    font-size: 27px;
    letter-spacing: -0.04em;
    color: #345f82;
}
.dialog-summary span {
    font-size: 11px;
    color: #7b95ad;
}
.dialog-table {
    max-height: 210px;
    overflow: auto;
    margin-bottom: 24px;
    border: 1px solid #e5eaf0;
    border-radius: 8px;
}
.dialog-table td,
.dialog-table th {
    font-size: 10px;
    padding: 10px;
}
.dialog-table input {
    font-size: 10px;
    width: 100px;
    min-height: 32px;
    padding: 5px;
}
.mobile-bottom {
    display: none;
}
.resident-welcome {
    padding: 30px 34px;
    border-radius: 13px;
    background: #244b6b;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}
.resident-welcome h2 {
    font-size: 29px;
    font-weight: 400;
    line-height: 1.3;
    color: white;
}
.resident-welcome p {
    font-size: 12px;
    color: #b7cedf;
    margin-top: 10px;
}
.resident-welcome .eyebrow {
    color: #d5b275;
    margin-bottom: 16px;
}
.resident-welcome > span {
    font-size: 90px;
    line-height: 1;
    color: #e6cf9f66;
}
.invoice-card {
    padding: 25px;
    border-radius: 11px;
    border: 1px solid #e0e8f0;
    background: white;
}
.invoice-card h3 {
    font-size: 12px;
    color: #7890a5;
    letter-spacing: 0;
    font-weight: 500;
}
.invoice-card .invoice-amount {
    font-size: 36px;
    letter-spacing: -0.06em;
    color: #2e5270;
    margin: 20px 0 12px;
}
.invoice-card p {
    font-size: 11px;
}
.invoice-card .page-actions {
    margin-top: 22px;
}
.invoice-card footer {
    margin-top: 22px;
    font-size: 10px;
    color: #90a2b3;
}
.pix-view {
    text-align: center;
}
.pix-view img {
    width: 230px;
    height: 230px;
    margin: 15px auto;
}
.pix-view textarea {
    font-size: 11px;
    word-break: break-all;
    min-height: 95px;
}
.pix-view strong {
    font-size: 30px;
    color: #345e81;
}
.file-name {
    max-width: 300px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.status-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.step-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #e8eef4;
}
.step-row > span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: #eef4f9;
    border-radius: 50%;
    color: #6989a5;
    font-size: 11px;
}
.step-row h3 {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
}
.step-row p {
    font-size: 10px;
    margin-top: 5px;
}
.confirmation {
    padding: 15px;
    border: 1px solid #e7d5b4;
    background: #fff8eb;
    border-radius: 8px;
    font-size: 11px;
    color: #8e754c;
    margin-top: 20px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox-label input {
    flex-shrink: 0;
}
.editor-wrap {
    grid-column: 1/-1;
    min-width: 0;
}
.oe-editor {
    max-width: 100%;
}
.data-error {
    padding: 25px;
    background: #fff5f0;
    border: 1px solid #eed7cb;
    border-radius: 10px;
    color: #975f40;
}
.data-error p {
    color: #a47a62;
    margin: 10px 0;
    font-size: 12px;
}
.chart-empty {
    height: 210px;
    display: grid;
    place-items: center;
    color: #9cabb8;
    font-size: 11px;
}
.inline-help {
    font-size: 11px;
    color: #8a99aa;
    margin: 18px 0;
}
.audit-detail {
    max-width: 250px;
    white-space: normal;
    font-size: 10px;
}
@media (min-width: 1500px) {
    .hero {
        gap: 90px;
    }
    .hero-art > img {
        height: 570px;
    }
    .hero-art {
        min-height: 570px;
    }
}
@media (max-width: 1150px) {
    .site-header {
        padding: 0 30px;
    }
    .site-header nav {
        gap: 18px;
    }
    .hero {
        gap: 30px;
        padding: 45px 30px;
    }
    .hero-actions {
        gap: 15px;
        flex-wrap: wrap;
    }
    .section {
        padding: 65px 30px;
    }
    .access-banner {
        margin: 0 30px 60px;
        padding: 35px;
    }
    .site-footer {
        padding: 30px;
    }
    .values-strip {
        gap: 35px;
    }
    .sidebar {
        width: 210px;
    }
    .workspace-main {
        margin-left: 210px;
    }
    #content {
        padding: 28px 24px;
    }
    .topbar {
        padding: 0 24px;
    }
    .stats {
        gap: 12px;
    }
    .stat {
        padding: 16px;
    }
    .stat strong {
        font-size: 22px;
    }
    .filters {
        grid-template-columns: 1fr 1fr;
    }
    .list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1.5fr 1fr;
    }
    .quick-actions {
        grid-template-columns: 1fr;
    }
    .auth-visual {
        padding: 40px;
    }
    .auth-form-wrap {
        padding: 40px;
    }
    .auth-visual h1 {
        font-size: 52px;
    }
}
@media (max-width: 800px) {
    .site-header {
        height: 80px;
        padding: 0 22px;
    }
    .site-header nav {
        display: none;
    }
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 40px;
    }
    .hero h1 {
        font-size: 58px;
    }
    .hero-art {
        min-height: 440px;
        max-width: 560px;
        width: 100%;
        margin: auto;
    }
    .hero-art > img {
        height: 480px;
    }
    .hero-copy {
        padding-top: 12px;
    }
    .values-strip {
        gap: 20px;
        padding: 22px;
        font-size: 10px;
        justify-content: space-between;
    }
    .values-strip b {
        display: block;
    }
    .section {
        padding: 55px 24px;
    }
    .split,
    .portal-section {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .section h2 {
        font-size: 36px;
    }
    .section-heading {
        align-items: start;
    }
    .section-heading > p {
        max-width: 160px;
        font-size: 11px;
    }
    .principles {
        gap: 20px;
    }
    .principles h3 {
        font-size: 19px;
    }
    .principles p {
        font-size: 12px;
    }
    .access-banner {
        margin: 0 24px 45px;
        padding: 30px;
        align-items: start;
        flex-direction: column;
    }
    .access-banner h2 {
        font-size: 27px;
    }
    .site-footer {
        flex-wrap: wrap;
        gap: 25px;
        padding: 30px 24px;
    }
    .site-footer > div {
        width: 100%;
    }
    .site-footer small {
        text-align: left;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
    }
    .sidebar.open {
        transform: translateX(0);
        width: 238px;
        box-shadow: 10px 0 60px #12283b50;
    }
    .workspace-main {
        margin-left: 0;
    }
    .topbar {
        height: 64px;
        padding: 0 18px;
        gap: 12px;
    }
    .menu-button {
        display: grid;
    }
    .breadcrumb {
        font-size: 10px;
        flex: 1;
    }
    .breadcrumb > span,
    .breadcrumb > b {
        display: none;
    }
    .topbar-date {
        display: none;
    }
    .topbar-right select {
        max-width: 150px;
        font-size: 10px;
        padding: 0;
    }
    .topbar-right {
        gap: 8px;
    }
    #content {
        padding: 25px 18px 35px;
    }
    .page-head h1 {
        font-size: 25px;
    }
    .page-head {
        align-items: start;
        margin-bottom: 22px;
    }
    .page-head p {
        font-size: 11px;
        max-width: 350px;
    }
    .page-actions {
        gap: 7px;
    }
    .page-actions .button {
        font-size: 11px;
        padding: 10px 13px;
        gap: 10px;
        min-height: 40px;
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .stat {
        padding: 16px;
    }
    .stat strong {
        font-size: 24px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }
    .quick-action {
        padding: 13px;
        flex-direction: column;
        align-items: start;
    }
    .quick-action h3 {
        font-size: 10px;
    }
    .quick-action p {
        font-size: 9px;
    }
    .filters {
        padding: 16px;
        gap: 12px;
    }
    .selection-toolbar {
        padding: 12px 15px;
        align-items: start;
        flex-direction: column;
    }
    .selection-actions {
        width: 100%;
        justify-content: space-between;
    }
    .selection-actions .button {
        font-size: 11px;
        padding: 10px 13px;
        min-height: 38px;
    }
    .table-footer {
        padding: 14px;
        font-size: 9px;
    }
    .list-grid {
        gap: 12px;
    }
    .app-footer {
        padding: 16px 18px;
        font-size: 8px;
    }
    .app-footer > span:last-child {
        display: none;
    }
    .auth-layout {
        grid-template-columns: 1fr;
    }
    .auth-visual {
        display: none;
    }
    .auth-form-wrap {
        padding: 28px;
        min-height: 100dvh;
    }
    .auth-form {
        margin: 60px auto;
    }
    .auth-form h2 {
        font-size: 38px;
    }
    .resident-welcome {
        padding: 25px;
    }
    .resident-welcome h2 {
        font-size: 26px;
    }
    .resident-welcome > span {
        font-size: 70px;
    }
    .toast-stack {
        right: 15px;
        left: 15px;
        bottom: 15px;
        max-width: none;
    }
    .page-head .eyebrow {
        font-size: 8px;
    }
    .dialog-head {
        padding: 18px;
    }
    #modal-body {
        padding: 18px;
    }
    .dialog-summary strong {
        font-size: 24px;
    }
}
@media (max-width: 480px) {
    .hero h1 {
        font-size: 51px;
    }
    .hero-actions .button {
        gap: 20px;
        font-size: 12px;
    }
    .hero-art > img {
        height: 420px;
    }
    .hero-art {
        min-height: 420px;
    }
    .site-header .button {
        font-size: 11px;
        padding: 10px 12px;
        gap: 10px;
    }
    .brand > span {
        font-size: 19px;
    }
    .brand > img {
        width: 36px;
        height: 36px;
    }
    .values-strip {
        gap: 10px;
        font-size: 9px;
    }
    .section-heading {
        flex-direction: column;
        gap: 20px;
    }
    .section-heading > p {
        max-width: none;
    }
    .principles {
        grid-template-columns: 1fr;
        margin-top: 35px;
        gap: 30px;
    }
    .principles article {
        display: grid;
        grid-template-columns: 45px 1fr;
        column-gap: 15px;
    }
    .principle-number {
        grid-column: 1/-1;
    }
    .line-icon {
        grid-row: 2/4;
        margin: 14px 0;
    }
    .principles h3 {
        margin: 18px 0 12px;
    }
    .principles p {
        max-width: none;
    }
    .portal-features h3 {
        font-size: 17px;
    }
    .hero-note {
        display: none;
    }
    .list-grid {
        grid-template-columns: 1fr;
    }
    .stat strong {
        font-size: 21px;
    }
    .stat-top {
        font-size: 10px;
    }
    .stat small {
        font-size: 8px;
    }
    .stat-icon {
        width: 25px;
        height: 25px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-grid .span-2 {
        grid-column: auto;
    }
    .filters {
        grid-template-columns: 1fr 1fr;
    }
    .filters select[multiple] {
        min-height: 100px;
    }
    .filter-actions {
        flex-wrap: wrap;
    }
    .filter-actions .checkbox-label {
        margin-left: 0;
        width: 100%;
    }
    .page-head {
        flex-wrap: wrap;
    }
    .page-head .page-actions {
        width: 100%;
    }
    .topbar-right select {
        max-width: 120px;
    }
    .dialog-summary {
        gap: 15px;
    }
    .dialog-summary strong {
        font-size: 21px;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
    }
}

/* Institutional identity follows the approved Slate Blue + Gold palette. */
.institutional h1,
.institutional h2,
.institutional h3 {
    color: #274c77;
}
.institutional h1 em,
.institutional h2 em {
    color: #728aa0;
}
.community {
    background: #edf2f6;
}
.principles article {
    border-color: #c6d3df;
}
.principles h3,
.portal-features h3 {
    color: #344f68;
}
.principles p,
.portal-features p {
    color: #596779;
}
.art-label {
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}
.access-banner {
    background: #274c77;
}
.line-icon {
    color: #9a7d4b;
}
.hero-note,
.hero-note strong,
.site-footer p {
    color: #596779;
}
.site-header nav {
    font-size: 13px;
}
.stat small,
.filter-help,
.table-footer,
.bar-label,
.bar-value,
.app-footer,
.form-hint {
    color: #64768a;
}
.sidebar nav {
    scrollbar-color: #4c6884 transparent;
}
.tag {
    font-size: 10px;
}
th {
    color: #596d82;
}

label,
input,
select,
textarea {
    min-width: 0;
}
.selection-actions {
    flex-wrap: wrap;
}
.stat strong {
    overflow-wrap: anywhere;
}
.rich-text img {
    max-width: 100%;
    height: auto;
}
.oe-root {
    border-radius: 9px;
}
.oe-root button {
    font: inherit;
}
dialog {
    scrollbar-width: thin;
}
@media (max-width: 800px) {
    .table-button {
        min-height: 44px;
    }
    .icon-button {
        width: 44px;
        height: 44px;
    }
    .nav-link {
        min-height: 44px;
    }
    .selection-actions .button {
        min-height: 44px;
    }
    .page-actions {
        flex-wrap: wrap;
    }
}

/* Historical source records */
.legacy-source {
    display: flex;
    align-items: end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.legacy-source label {
    flex: 1;
    min-width: 220px;
}
.legacy-source select {
    width: 100%;
}
.legacy-totals {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding: 12px 24px 24px;
}
.legacy-totals span {
    display: block;
    color: #64748b;
    font-size: 12px;
}
.legacy-totals strong {
    display: block;
    font-size: 21px;
    margin-top: 6px;
}
.legacy-evidence {
    max-width: 290px;
    min-width: 100px;
}
.legacy-evidence summary,
.legacy-quotas > summary {
    cursor: pointer;
    color: #274c77;
    font-weight: 600;
}
.legacy-evidence dt {
    margin-top: 10px;
    font-size: 11px;
}
.legacy-evidence dd {
    margin: 4px 0;
    overflow-wrap: anywhere;
}
.legacy-evidence small {
    display: block;
    font-size: 10px;
    color: #64748b;
    overflow-wrap: anywhere;
}
.legacy-quotas {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
}
.legacy-quotas > .form-hint {
    margin: 14px 0;
}
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Financial and consumption dashboard */
.dashboard-filters {
    display: flex;
    gap: 18px;
    align-items: end;
    flex-wrap: wrap;
    padding: 20px 24px;
    margin-bottom: 22px;
}
.dashboard-filters label {
    min-width: 150px;
    flex: 1;
}
.dashboard-filters input,
.dashboard-filters select {
    width: 100%;
}
.dashboard-chart {
    display: block;
    width: 100%;
    min-height: 190px;
    overflow: visible;
}
.dashboard-chart text {
    fill: #667b91;
    font-size: 17px;
    font-family: inherit;
}
.dashboard-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
}
.dashboard-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
}
.dashboard-rankings {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 22px;
}
.rank-bars {
    display: grid;
    gap: 16px;
}
.rank-item {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    color: inherit;
    font: inherit;
}
.rank-item > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 12px;
    margin-bottom: 7px;
}
.rank-item strong {
    white-space: nowrap;
    font-weight: 600;
}
.rank-item small {
    display: block;
    color: #718298;
    margin-top: 5px;
    font-size: 10px;
}
.rank-track {
    display: block;
    height: 8px;
    border-radius: 8px;
    background: #edf2f7;
    overflow: hidden;
}
.rank-track > span {
    display: block;
    height: 100%;
    background: #507c9e;
    border-radius: 8px;
}
.rank-item:is(button) {
    cursor: pointer;
}
.rank-item:is(button):hover .rank-track > span {
    background: #2b7b8c;
}
.chart-empty {
    min-height: 190px;
    display: grid;
    place-items: center;
    color: #718298;
    font-size: 13px;
}
.unit-month-total {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    background: #f2f6fa;
    align-items: center;
}
.unit-month-total strong {
    font-size: 24px;
    color: #274c77;
}
.dashboard-grid > *,
.dashboard-rankings > * {
    min-width: 0;
}
@media (max-width: 1100px) {
    .dashboard-rankings {
        grid-template-columns: 1fr;
    }
    .dashboard-chart {
        min-height: 145px;
    }
}
@media (max-width: 650px) {
    .dashboard-filters {
        padding: 18px;
        gap: 12px;
    }
    .dashboard-filters label {
        flex-basis: 100%;
    }
    .dashboard-chart text {
        font-size: 12px;
    }
    .dashboard-legend {
        font-size: 11px;
    }
}

.dashboard-grid:has(.dashboard-chart) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1050px) {
    .dashboard-grid:has(.dashboard-chart) {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 650px) {
    .panel-body:has(> .dashboard-chart) {
        overflow-x: auto;
    }
    .dashboard-chart {
        min-width: 520px;
    }
    .dashboard-chart text {
        font-size: 17px;
    }
}

.crud-toolbar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.crud-toolbar > label {
    flex: 1;
    min-width: 170px;
}
.crud-toolbar form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex: 1.4;
}
.crud-toolbar form label {
    flex: 1;
}
.crud-related {
    margin-bottom: 18px;
}
.crud-actions-cell {
    min-width: 160px;
}
.crud-actions {
    display: inline-block;
    vertical-align: top;
    margin-left: 5px;
}
.crud-actions summary {
    cursor: pointer;
    color: #3b5b7b;
    font-size: 11px;
    padding: 8px;
    list-style: none;
    border: 1px solid #dce5ee;
    border-radius: 6px;
    white-space: nowrap;
}
.crud-actions[open] {
    display: inline-grid;
    gap: 6px;
}
.crud-actions[open] summary {
    background: #edf3f8;
}
.crud-actions .table-button {
    display: block;
    width: 100%;
    text-align: left;
    margin: 0;
}
.danger-text {
    color: #a0483d !important;
}
.crud-field {
    min-width: 0;
}
.crud-field > label {
    width: 100%;
}
.crud-field[hidden],
[hidden] {
    display: none !important;
}
.crud-toolbar select {
    max-width: 100%;
}
@media (max-width: 650px) {
    .crud-toolbar {
        padding: 18px;
    }
    .crud-toolbar > label,
    .crud-toolbar form {
        flex-basis: 100%;
    }
    .crud-related {
        flex-wrap: wrap;
    }
    .crud-actions-cell {
        min-width: 145px;
    }
}

/* Monthly statement: readable figures and matching numeric column alignment. */
:is(#summary-body, #unit-month-body) .panel {
    border-color: #c4d4e5;
    box-shadow: 0 2px 8px #203e5d08;
}
:is(#summary-body, #unit-month-body) .panel-head {
    background: #f4f8fc;
    border-bottom: 1px solid #c4d4e5;
}
:is(#summary-body, #unit-month-body) .panel-head h2 {
    font-size: 18px;
    font-weight: 650;
    color: #173f6b;
}
:is(#summary-body, #unit-month-body) p,
:is(#summary-body, #unit-month-body) .form-hint {
    color: #425b72;
    font-size: 12px;
}
:is(#summary-body, #unit-month-body) table {
    font-size: 13px;
    color: #233b53;
}
:is(#summary-body, #unit-month-body) th {
    padding: 15px 16px;
    background: #e4edf7;
    border-bottom: 2px solid #b3c9df;
    color: #24435f;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0;
    text-align: left;
    vertical-align: middle;
}
:is(#summary-body, #unit-month-body) td {
    padding: 16px;
    color: #243b53;
    font-size: 13px;
    font-weight: 500;
    vertical-align: middle;
}
:is(#summary-body, #unit-month-body) th.money,
:is(#summary-body, #unit-month-body) td.money {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
:is(#summary-body, #unit-month-body) td.money {
    min-width: 104px;
}
:is(#summary-body, #unit-month-body) td strong {
    font-weight: 700;
    color: #153c64;
}
:is(#summary-body, #unit-month-body) td small {
    font-size: 11px;
    color: #536b81;
    margin-top: 4px;
}
:is(#summary-body, #unit-month-body) tbody tr:nth-child(even) {
    background: #f3f7fb;
}
:is(#summary-body, #unit-month-body) tbody tr:hover {
    background: #e7f1fc;
}
:is(#summary-body, #unit-month-body) tr.summary-total {
    background: #dfeaf7;
    border-top: 2px solid #aec5dd;
}
:is(#summary-body, #unit-month-body) tr.summary-total td {
    font-weight: 700;
    color: #163d67;
}
:is(#summary-body, #unit-month-body) .stat {
    border-top: 3px solid #3e78b2;
    box-shadow: 0 3px 10px #203e5d0a;
}
:is(#summary-body, #unit-month-body) .stat:last-child {
    border-top-color: #27806a;
}
:is(#summary-body, #unit-month-body) .stat-top {
    font-size: 12px;
    font-weight: 600;
    color: #425b72;
}
:is(#summary-body, #unit-month-body) .stat strong {
    color: #173f6b;
    font-weight: 650;
}
:is(#summary-body, #unit-month-body) .stat small {
    font-size: 11px;
    color: #4b657b;
}
.summary-progress {
    flex-basis: 100%;
    padding: 16px 18px;
    background: #eaf2fb;
    border: 1px solid #b5cee7;
    border-radius: 9px;
    color: #1d466f;
}
.summary-progress-heading {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    margin-bottom: 9px;
    font-size: 14px;
}
.summary-progress-heading > span {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.summary-progress progress {
    display: block;
    width: 100%;
    height: 14px;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #d5e3f1;
    accent-color: #2779b8;
}
.summary-progress progress::-webkit-progress-bar {
    background: #d5e3f1;
    border-radius: 20px;
}
.summary-progress progress::-webkit-progress-value {
    background: linear-gradient(90deg, #285c91, #269caa);
    border-radius: 20px;
    transition: width 0.2s;
}
.summary-progress progress::-moz-progress-bar {
    background: #2779b8;
    border-radius: 20px;
}
.summary-progress p {
    font-size: 12px;
    color: #365975;
    margin-top: 8px;
}
.summary-progress[data-state='done'] {
    background: #e8f5ee;
    border-color: #9bc9ad;
}
.summary-progress[data-state='error'] {
    background: #fff0ee;
    border-color: #dda69f;
}
@media (max-width: 650px) {
    :is(#summary-body, #unit-month-body) td {
        font-size: 12px;
        padding: 13px 14px;
    }
    :is(#summary-body, #unit-month-body) th {
        font-size: 11px;
        padding: 13px 14px;
    }
    .summary-progress-heading {
        font-size: 12px;
    }
    .summary-progress {
        padding: 14px;
    }
}

#unit-month-body .unit-month-total {
    background: #dfeaf7;
    color: #163d67;
    border-top: 2px solid #aec5dd;
    font-size: 15px;
}
#unit-month-body .table-button {
    margin: 3px 4px;
}
.dialog-table select {
    min-width: 220px;
}
.dialog-table input[type='date'] {
    min-width: 145px;
}

/* Automação, pendências e leitura de água pelos moradores */
.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
#modal-body details {
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 10px 14px;
    margin-bottom: 10px;
}
#modal-body details summary {
    cursor: pointer;
}
#modal-body details li {
    margin: 6px 0;
}
#modal-body details .table-button {
    margin-left: 6px;
}
.meter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.meter-card {
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    padding: 16px;
    display: grid;
    gap: 10px;
}
.meter-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.meter-card h3 {
    margin: 0;
    font-size: 15px;
}
.meter-card p {
    margin: 0;
}
.meter-form {
    display: grid;
    gap: 12px;
}
.photo-input {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    border: 1.5px dashed #b9c6d3;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}
.photo-input span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.photo-input input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.photo-input:focus-within {
    outline: 2px solid #567fa7;
    outline-offset: 2px;
}
.meter-preview {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 9px;
    background: #f4f7fa;
}
.meter-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}
.button.full {
    width: 100%;
    justify-content: center;
}
.family-unit {
    margin-bottom: 24px;
}

/* Leitura de água pelo celular (QR code) */
.field-page {
    background: var(--bg);
    min-height: 100vh;
}
.field-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
}
.field-header div {
    display: grid;
}
.field-header span {
    font-size: 13px;
    opacity: 0.85;
}
.field-main {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 16px 40px;
    display: grid;
    gap: 16px;
}
.field-progress div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    margin-bottom: 6px;
}
.field-progress span {
    color: var(--muted);
}
.field-progress progress {
    width: 100%;
    height: 10px;
    accent-color: var(--success);
}
.field-form {
    display: grid;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}
.field-form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}
.field-form input:not([type='file']) {
    font-size: 20px;
    padding: 12px;
    min-height: 52px;
}
.field-meter {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 15px;
}
.field-meter .warn {
    color: #8a5a00;
}
.field-consumption {
    margin: 0;
    font-weight: 600;
    color: var(--success);
}
.field-message {
    margin: 0;
    min-height: 1.4em;
    font-weight: 600;
    color: var(--success);
}
.field-consumption.error,
.field-message.error {
    color: var(--danger);
}
.field-form .photo-input {
    min-height: 88px;
    font-size: 17px;
}
.field-list h2 {
    font-size: 16px;
    margin: 4px 0 8px;
}
.field-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.field-list button {
    width: 100%;
    display: grid;
    gap: 2px;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font: inherit;
    cursor: pointer;
}
.field-list button span {
    font-size: 13px;
    color: var(--muted);
}
.field-list button.done {
    border-color: #b7dfcc;
    background: #effaf4;
}
.field-list button.done span {
    color: var(--success);
}
.qr-box {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}
.qr-box img {
    width: min(280px, 80vw);
    height: auto;
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.field-offline {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff4dc;
    color: #7a4b00;
    font-weight: 600;
}
.field-consumption.warn {
    color: #8a5a00;
}
.field-confirm {
    border: 1px solid #f0c36d;
    background: #fff8e6;
    border-radius: 10px;
    padding: 12px;
}
.field-confirm p {
    margin: 0 0 10px;
    font-weight: 600;
}
.field-swap {
    display: grid;
    gap: 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 12px;
    margin: 0;
}
.field-swap legend {
    font-weight: 700;
    padding: 0 6px;
}
.field-list button.waiting {
    border-color: #f0c36d;
    background: #fff8e6;
}
.field-list button.waiting span {
    color: #8a5a00;
}

/* Fechamento passo a passo, inadimplência e consumo no portal */
.closing-guide {
    margin-bottom: 22px;
}
.closing-guide progress {
    width: 160px;
    height: 10px;
    accent-color: var(--success);
}
.closing-steps {
    list-style: none;
    margin: 0;
    padding: 0 22px 18px;
    display: grid;
    gap: 10px;
}
.closing-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
}
.closing-step.ok {
    background: #f3fbf7;
    border-color: #cfe9dc;
}
.closing-step.pendente,
.closing-step.bloqueada {
    border-color: #f0c9c9;
}
.closing-step h3 {
    margin: 0 0 4px;
    font-size: 15px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.closing-step p {
    margin: 0;
    color: var(--muted);
}
.closing-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.closing-step.ok .closing-number {
    background: var(--success);
}
.closing-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.closing-actions:empty {
    display: none;
}
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.metric {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: grid;
    gap: 6px;
}
.metric span {
    color: var(--muted);
    font-size: 13px;
}
.metric strong {
    font-size: 22px;
}
.deal-invoices {
    display: grid;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    margin: 0 0 14px;
}
.deal-preview {
    font-size: 15px;
}
.deal-card {
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.deal-card h3 {
    margin: 0 0 4px;
    font-size: 15px;
}
.deal-cancel {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
    margin-top: 10px;
}
.deal-cancel label {
    flex: 1;
    min-width: 200px;
}
.water-bars {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 150px;
}
.water-bars li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: 3px;
    font-size: 11px;
    color: var(--muted);
}
.water-bars b {
    font-weight: 600;
    color: var(--text);
}
.water-bar {
    width: 100%;
    max-width: 34px;
    border-radius: 6px 6px 2px 2px;
    background: #5b8dbb;
}
.water-bars li:last-child .water-bar {
    background: var(--primary);
}
.field-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}
.field-form .checkbox-label input {
    width: 22px;
    height: 22px;
}
#closing-guide + .panel .step-row {
    display: none;
}
.field-ocr {
    display: grid;
    gap: 8px;
}
.field-ocr canvas {
    width: 100%;
    height: auto;
    border-radius: 10px;
    touch-action: none;
    background: #f4f7fa;
}
.field-ocr-status {
    margin: 0;
    font-weight: 600;
    color: var(--primary);
}
.field-ocr-status.warn {
    color: #8a5a00;
}
.field-ocr-engine {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}
.field-form input.ocr-filled {
    border-color: #f5b301;
    background: #fffbea;
}
.field-parts {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid #c9d7e6;
    border-radius: 10px;
    background: #f5f9fd;
}
.field-parts-help {
    margin: 0;
    font-size: 15px;
}
.field-part {
    display: grid;
    gap: 8px;
}
.field-part small {
    font-weight: 400;
    color: var(--muted);
    margin-left: 6px;
}
.field-part .photo-input.small {
    min-height: 52px;
    font-size: 15px;
}
.field-part-status {
    color: var(--primary);
}
.field-form input.field-total {
    background: #eef3f8;
    font-weight: 700;
}

/* Fatura aberta pelo link do WhatsApp (sem senha). */
.invoice-total {
    display: grid;
    gap: 4px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
}
.invoice-total.paid {
    background: var(--success);
}
.invoice-total strong {
    font-size: 30px;
}
.invoice-total small {
    opacity: 0.9;
}
.invoice-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.invoice-card h2 {
    margin: 0;
    font-size: 17px;
}
.invoice-card p {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.invoice-pix {
    justify-items: center;
    text-align: center;
}
.invoice-pix img {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
}
.invoice-pix label {
    display: grid;
    gap: 6px;
    width: 100%;
    text-align: left;
    font-weight: 600;
}
.invoice-pix textarea {
    width: 100%;
    font:
        12px ui-monospace,
        monospace;
    word-break: break-all;
}
.invoice-hint {
    color: var(--muted);
    font-size: 13px;
}
.invoice-items {
    width: 100%;
    border-collapse: collapse;
}
.invoice-items td {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.invoice-items .money {
    text-align: right;
    white-space: nowrap;
    padding-left: 12px;
}
.invoice-items tfoot td {
    font-weight: 700;
    border-bottom: 0;
}
.invoice-water {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}
.invoice-water div {
    padding: 10px;
    border-radius: 10px;
    background: var(--bg);
}
.invoice-water dt {
    font-size: 12px;
    color: var(--muted);
}
.invoice-water dd {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 700;
}
.invoice-water small {
    color: var(--muted);
}
.invoice-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.invoice-photos a {
    display: grid;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
}
.invoice-photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
}
