:root {
  --blue: #007a33;
  --blue-2: #006229;
  --blue-soft: #e8f7ee;
  --green: #00953b;
  --green-soft: #e9f8ef;
  --red: #b42318;
  --red-soft: #fff0ee;
  --amber: #d68715;
  --amber-soft: #fff6e6;
  --teal: #187b68;
  --ink: #172033;
  --muted: #6f7a84;
  --line: #dfe7e4;
  --canvas: #f1f4f3;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --sidebar: 252px;
  --sidebar-collapsed: 78px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --control-height: 46px;
  --filter-control-height: 44px;
  --shadow-sm: 0 5px 18px rgba(0, 92, 42, .07);
  --shadow-md: 0 18px 48px rgba(0, 92, 42, .12);
  --shadow-lg: 0 28px 80px rgba(0, 76, 35, .2);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { min-width: 0; font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.icon-svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.boot-view {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  color: var(--muted);
}
.boot-mark { height: 42px; display: flex; align-items: end; justify-content: center; gap: 6px; }
.boot-mark span { width: 8px; height: 18px; border-radius: 8px; background: var(--blue); animation: bounce 1s infinite ease-in-out; }
.boot-mark span:nth-child(2) { height: 32px; background: var(--green); animation-delay: .12s; }
.boot-mark span:nth-child(3) { height: 24px; background: #7b868c; animation-delay: .24s; }
@keyframes bounce { 0%, 100% { transform: scaleY(.65); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }

.auth-view { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr); }
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 62px clamp(48px, 6vw, 96px) 46px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(20,184,82,.3), transparent 29%),
    radial-gradient(circle at 12% 84%, rgba(0,149,59,.28), transparent 31%),
    linear-gradient(145deg, #007a33 0%, #00632b 50%, #00451f 100%);
}
.auth-brand::before, .auth-brand::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; pointer-events: none; }
.auth-brand::before { top: -250px; right: -230px; width: 620px; height: 620px; box-shadow: 0 0 0 72px rgba(255,255,255,.025); }
.auth-brand::after { left: -260px; bottom: -330px; width: 600px; height: 600px; box-shadow: 0 0 0 76px rgba(255,255,255,.025); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand-logo { width: 100%; display: flex; justify-content: center; }
.auth-brand-logo img { width: min(390px, 78%); height: auto; display: block; }
.auth-brand-content { width: min(540px,100%); margin: auto 0; padding: 40px 0; }
.auth-accent { width: 76px; height: 7px; display: block; margin-bottom: 30px; background: #23d26d; border-radius: 999px; }
.auth-brand h1 { margin: 0 0 30px; font-size: clamp(52px, 5vw, 76px); line-height: .96; letter-spacing: -.06em; max-width: 650px; }
.auth-brand-content > p { max-width: 510px; margin: 0; color: rgba(255,255,255,.78); font-size: 19px; line-height: 1.55; }
.auth-pills { margin-top: 36px; display: flex; gap: 11px; flex-wrap: wrap; }
.auth-pills span { min-width: 112px; padding: 10px 18px; color: rgba(255,255,255,.9); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.24); border-radius: 999px; font-size: 13px; font-weight: 750; text-align: center; }
.auth-security { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.7); font-size: 12px; }
.security-dot { width: 9px; height: 9px; border-radius: 50%; background: #48dc85; box-shadow: 0 0 0 6px rgba(72,220,133,.12); }
.auth-panel { min-height: 100vh; padding: 32px; display: grid; place-items: center; background: #f4f6f8; }
.auth-card { width: min(540px, 100%); padding: 52px; background: #fff; border: 1px solid #dce5e1; border-radius: 28px; box-shadow: 0 24px 62px rgba(0,72,31,.11); }
.auth-card h2 { margin: 7px 0 14px; color: var(--ink); font-size: 38px; letter-spacing: -.045em; }
.auth-copy { margin: 0 0 34px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.auth-card .field { gap: 9px; margin-bottom: 20px; }
.auth-card .field > span { color: #374151; font-size: 12px; font-weight: 800; }
.auth-card .field input { height: 52px; min-height: 52px; padding: 12px 15px; border-radius: 12px; }
.auth-card .password-toggle { top: 7px; right: 7px; width: 38px; height: 38px; }
.auth-card .button-full { min-height: 54px; margin-top: 12px; border-radius: 12px; font-size: 17px; }
.auth-submit .icon-svg { width: 20px; height: 20px; }
.auth-card-login { width: min(430px, 100%); padding: 38px; border-radius: 24px; box-shadow: 0 24px 70px rgba(0,72,31,.12); }
.auth-card-login h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.auth-card-login .auth-copy { margin: 9px 0 28px; font-size: 14px; line-height: 1.5; }
.auth-card-login .field { gap: 7px; margin-bottom: 18px; }
.auth-card-login .field input { height: 44px; min-height: 44px; padding: 0 13px; border-radius: 11px; }
.auth-card-login .password-wrap input { padding-right: 82px; }
.auth-card-login .password-toggle { top: 6px; right: 7px; width: auto; height: 32px; padding: 0 9px; color: var(--blue); font-size: 11px; font-weight: 800; }
.auth-card-login .form-error { min-height: 20px; margin: -8px 0 4px; line-height: 1.45; }
.auth-card-login .button-full { min-height: 42px; margin-top: 0; padding: 10px 16px; border-radius: 11px; font-size: 13px; }
.auth-card-login .auth-submit .icon-svg { width: 18px; height: 18px; }
.mobile-auth-logo { display: none; margin: -12px -12px 26px; padding: 22px; border-radius: 16px; background: var(--blue); }
.mobile-auth-logo img { width: 210px; max-width: 100%; display: block; margin: 0 auto; }
.eyebrow { margin: 0; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.65); }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span { color: #475164; font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea, .input, .select {
  width: 100%; min-height: var(--control-height); padding: 10px 13px; color: var(--ink); background-color: #fff; border: 1px solid #cfd9d5; border-radius: 10px; outline: none; transition: border-color .18s, box-shadow .18s;
}
.field input, .field select, .input, .select { height: var(--control-height); }
.field textarea { min-height: 100px; height: auto; resize: vertical; }
.field select, .select, .filter-field select, .bank-select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475164' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px 14px;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,122,51,.09); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 46px; }
.icon-button { border: 0; background: transparent; color: var(--muted); }
.password-toggle { position: absolute; top: 5px; right: 5px; width: 36px; height: 36px; border-radius: 8px; }
.password-toggle:hover { background: var(--canvas); color: var(--blue); }
.form-error { min-height: 18px; margin: 14px 0 0; color: var(--red); font-size: 12px; font-weight: 650; }

.button { min-height: 42px; max-width: 100%; padding: 9px 16px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; transition: transform .16s, box-shadow .16s, background .16s; }
.button .icon-svg { width: 16px; height: 16px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 20px rgba(0,122,51,.18); }
.button-primary:hover { background: var(--blue-2); box-shadow: 0 12px 24px rgba(0,122,51,.24); }
.button-success { color: #fff; background: var(--green); }
.button-danger { color: #fff; background: var(--red); }
.button-secondary { color: var(--blue); background: #fff; border-color: #c9dacf; }
.button-secondary:hover { background: var(--blue-soft); }
.button-ghost { color: var(--blue); background: transparent; border-color: var(--line); }
.button-full { width: 100%; min-height: 48px; }
.button-compact { min-height: 38px; padding: 7px 13px; font-size: 13px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar); display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, #00953b 0%, #007a33 58%, #004b24 100%); box-shadow: 8px 0 34px rgba(0,90,39,.16); transition: width .22s ease, transform .22s ease;
}
.sidebar-brand { position: relative; height: 92px; padding: 11px 18px 9px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-symbol { width: 58px; height: 72px; display: grid; place-items: center; flex: 0 0 auto; }
.brand-symbol img { width: auto; max-width: 100%; height: 68px; object-fit: contain; }
.sidebar-collapse { position: absolute; top: 32px; right: -14px; z-index: 2; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; color: var(--blue); background: #fff; border: 1px solid #c9dacf; border-radius: 50%; box-shadow: 0 5px 14px rgba(0,72,31,.18); }
.sidebar-collapse:hover { background: var(--blue-soft); }
.sidebar-collapse .icon-svg { width: 15px; height: 15px; transition: transform .22s ease; }
.side-nav { padding: 18px 12px; display: grid; gap: 5px; }
.nav-button { position: relative; width: 100%; min-height: 50px; padding: 9px 13px; overflow: hidden; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; color: rgba(255,255,255,.78); background: transparent; border: 0; border-radius: 11px; text-align: left; font-size: 14px; font-weight: 700; }
.nav-button > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-button:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-button.active { color: #fff; background: rgba(255,255,255,.15); box-shadow: inset 3px 0 0 #42db80; }
.nav-icon { width: 27px; height: 27px; display: grid; place-items: center; color: currentColor; }
.nav-icon .icon-svg { width: 20px; height: 20px; }
.nav-count { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; color: #052713; background: #78eaa1; border-radius: 999px; font-size: 10px; }
.sidebar-foot { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 11px; align-items: center; margin-bottom: 10px; }
.user-avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; color: #006229; background: #e9fff0; border-radius: 50%; font-size: 13px; font-weight: 900; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.sidebar-user > div { min-width: 0; }
.sidebar-user strong, .sidebar-user > div > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { font-size: 14px; }
.sidebar-user > div > span { margin-top: 3px; color: rgba(255,255,255,.66); font-size: 11px; text-transform: capitalize; }
.logout-button { width: 100%; padding: 8px; display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.68); background: transparent; border: 0; border-radius: 8px; font-size: 13px; text-align: left; }
.logout-button .icon-svg { width: 16px; height: 16px; }
.logout-button:hover { color: #fff; background: rgba(255,255,255,.07); }

.workspace { min-height: 100vh; margin-left: var(--sidebar); transition: margin-left .22s ease; }
.app-shell.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); }
.app-shell.sidebar-collapsed .workspace { margin-left: var(--sidebar-collapsed); }
.app-shell.sidebar-collapsed .sidebar-collapse .icon-svg { transform: rotate(180deg); }
.app-shell.sidebar-collapsed .side-nav { padding-inline: 10px; }
.app-shell.sidebar-collapsed .nav-button { grid-template-columns: 28px; justify-content: center; padding-inline: 14px; }
.app-shell.sidebar-collapsed .nav-button > span:nth-child(2),
.app-shell.sidebar-collapsed .nav-count,
.app-shell.sidebar-collapsed .sidebar-user,
.app-shell.sidebar-collapsed .logout-button > span { display: none; }
.app-shell.sidebar-collapsed .sidebar-foot { padding: 12px 10px; }
.app-shell.sidebar-collapsed .logout-button { justify-content: center; }
.topbar { position: sticky; top: 0; z-index: 25; height: 92px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 14px; }
.topbar-left > div { min-width: 0; }
.topbar h1 { margin: 4px 0 0; font-size: 24px; letter-spacing: -.035em; }
.topbar h1, .topbar .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.live-date { max-width: 245px; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 9px; color: var(--ink); }
.live-date > .icon-svg { width: 18px; height: 18px; color: var(--green); justify-self: center; }
.live-date span { min-width: 0; display: block; }
.live-date strong, .live-date small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-date strong { font-size: 10px; font-weight: 780; text-transform: capitalize; }
.live-date small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.sync-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 650; }
.sync-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.mobile-menu-button { display: none; width: 38px; height: 38px; padding: 0; color: var(--blue); background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.main-content { position: relative; max-width: 1680px; margin: 0 auto; padding: 30px 32px 56px; outline: none; }
.main-content::before { content: ""; position: fixed; z-index: 30; top: 91px; left: var(--sidebar); right: 0; height: 2px; opacity: 0; background: linear-gradient(90deg, transparent, var(--green), var(--blue), transparent); transform: translateX(-45%); pointer-events: none; }
.main-content.is-refreshing::before { opacity: 1; animation: progressSweep 1.05s ease-in-out infinite; }
@keyframes progressSweep { 50% { transform: translateX(45%); } }

.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-intro > div:first-child { min-width: 0; }
.page-intro h2 { margin: 0 0 7px; font-size: 29px; letter-spacing: -.04em; }
.page-intro h2, .page-intro p { overflow-wrap: anywhere; }
.page-intro p { max-width: 750px; margin: 0; color: var(--muted); line-height: 1.55; }
.intro-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.intro-actions .button { min-height: 42px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-intro-actions { width: min(560px, 100%); display: grid; grid-template-columns: repeat(2, minmax(210px, 1fr)); align-items: end; gap: 9px; }
.bank-intro-actions .button { width: 100%; max-width: none; }
.bank-intro-actions .date-range-wrap { width: 100%; min-width: 0; flex: none; gap: 5px; }
.bank-intro-actions .date-range-wrap-intro > label { display: none; }
.bank-intro-actions .date-range-button { height: 42px; min-height: 42px; }
.bank-intro-actions .date-range-button:not(.active) > span { color: #a7a7a7; }
.bank-intro-actions .date-popover { right: 0; left: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 16px; margin-bottom: 22px; }
.stat-card { position: relative; min-width: 0; min-height: 138px; height: 100%; padding: 21px; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.stat-card::after { content: ""; position: absolute; right: -34px; bottom: -54px; width: 118px; height: 118px; border-radius: 50%; background: color-mix(in srgb, var(--accent, var(--blue)) 11%, transparent); }
.stat-label { min-width: 0; min-height: 34px; padding-right: 46px; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .06em; line-height: 1.35; text-overflow: clip; text-transform: uppercase; white-space: normal; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.stat-glyph { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; overflow: hidden; display: grid; place-items: center; color: var(--accent, var(--blue)); background: color-mix(in srgb, var(--accent, var(--blue)) 10%, white); border-radius: 10px; }
.stat-glyph .icon-svg { width: 18px; height: 18px; }
.stat-value { position: relative; z-index: 1; display: block; max-width: 100%; margin-top: 14px; overflow: hidden; color: var(--ink); font-size: clamp(21px, 2.1vw, 34px); letter-spacing: -.045em; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.stat-note { position: relative; z-index: 1; display: block; max-width: 100%; margin-top: 7px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.stat-note.alert { color: var(--red); font-weight: 700; }

.content-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(330px,.55fr); gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.panel-header { min-height: 74px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-header > div:first-child { min-width: 0; }
.panel-title { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.panel-title, .panel-description { overflow-wrap: anywhere; }
.panel-description { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.panel-body { padding: 20px; }
.panel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-grid { display: grid; gap: 11px; }
.quick-card { width: 100%; padding: 15px; overflow: hidden; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 13px; text-align: left; }
.quick-card:hover { border-color: #aed0bc; box-shadow: 0 8px 22px rgba(0,122,51,.08); transform: translateY(-1px); }
.quick-icon { width: 44px; height: 44px; padding: 11px; overflow: hidden; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 12px; line-height: 0; }
.quick-icon .icon-svg { width: 20px; height: 20px; display: block; }
.activity-icon .icon-svg { width: 18px; height: 18px; display: block; }
.import-icon .icon-svg, .empty-state-icon .icon-svg { width: 21px; height: 21px; }
.quick-card > span:nth-child(2), .quick-card > span:nth-child(2) strong, .quick-card > span:nth-child(2) span { min-width: 0; display: block; }
.quick-card strong { font-size: 13px; }
.quick-card > span:nth-child(2) strong, .quick-card > span:nth-child(2) span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-card > span:nth-child(2) span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.quick-arrow { display: grid; place-items: center; color: #8b9b93; }
.quick-arrow .icon-svg { width: 17px; height: 17px; }

.filter-panel { margin-bottom: 18px; padding: 16px; display: flex; align-items: end; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.filter-field { min-width: 170px; flex: 1; display: grid; gap: 6px; }
.filter-field.wide { min-width: 240px; flex: 1.6; }
.filter-field label { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.filter-field input, .filter-field select { width: 100%; height: var(--filter-control-height); min-height: var(--filter-control-height); padding: 8px 12px; color: var(--ink); background-color: #fff; border: 1px solid #ced9d5; border-radius: 10px; outline: none; }
.filter-field input:focus, .filter-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,122,51,.08); }
.filter-actions { display: flex; align-items: stretch; gap: 8px; }
.filter-actions .button { height: var(--filter-control-height); min-height: var(--filter-control-height); }

.date-range-wrap { position: relative; min-width: 260px; flex: 1.25; display: grid; gap: 6px; }
.date-range-wrap > label { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.date-range-button { width: 100%; height: var(--filter-control-height); min-height: var(--filter-control-height); padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); background: #fff; border: 1px solid #ced9d5; border-radius: 10px; text-align: left; }
.date-range-button > span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.date-range-button.active { color: var(--blue); border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,149,59,.09); }
.date-range-button .chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.date-popover { position: absolute; z-index: 80; top: calc(100% + 10px); left: 0; width: min(720px, calc(100vw - 80px)); padding: 18px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,92,42,.18); }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.calendar-toolbar-copy { color: var(--muted); font-size: 12px; }
.calendar-nav { display: flex; gap: 7px; }
.calendar-nav button { width: 34px; height: 34px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 9px; font-size: 18px; }
.calendar-months { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.calendar-month h3 { margin: 0 0 10px; color: var(--blue); font-size: 14px; text-align: center; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-weekday { padding: 5px 0; color: #86938f; font-size: 9px; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day { display: grid; place-items: center; min-width: 32px; height: 32px; color: var(--ink); background: transparent; border: 0; border-radius: 9px; font-size: 11px; }
.calendar-day:hover { background: var(--green-soft); }
.calendar-day.outside { color: #b8c1be; }
.calendar-day.in-range { color: #063d20; background: #e8f7ee; border-radius: 0; }
.calendar-day.range-start, .calendar-day.range-end { color: white; background: var(--green); border-radius: 9px; font-weight: 800; }
.calendar-day.today { box-shadow: inset 0 0 0 1px var(--blue); }
.calendar-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.calendar-selection { color: var(--muted); font-size: 11px; }
.calendar-footer-actions { display: flex; gap: 8px; }

.account-grid { display: grid; grid-template-columns: repeat(4, minmax(210px,1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 13px; margin-bottom: 20px; }
.account-card { position: relative; overflow: hidden; min-width: 0; min-height: 128px; height: 100%; padding: 18px; color: var(--account-ink,#fff); background: linear-gradient(135deg, var(--account-color,#007a33), color-mix(in srgb, var(--account-color,#007a33) 72%, #00351a)); border: 0; border-radius: 15px; text-align: left; box-shadow: 0 12px 26px color-mix(in srgb, var(--account-color,#007a33) 22%, transparent); }
.account-card.account-card-pichincha { background: linear-gradient(135deg, #ffcf00 0%, #e8b900 100%); }
.account-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -50px; top: -50px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.06); }
.account-card.active { outline: 3px solid #fff; box-shadow: 0 0 0 4px var(--green), 0 15px 32px rgba(0,92,42,.22); }
.account-bank, .account-alias, .account-balance, .account-date { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-bank { position: relative; z-index: 1; display: block; color: var(--account-muted,rgba(255,255,255,.72)); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.account-alias { position: relative; z-index: 1; display: block; margin-top: 7px; font-size: 14px; font-weight: 750; }
.account-balance { position: relative; z-index: 1; display: block; margin-top: 18px; font-size: clamp(18px,1.7vw,23px); letter-spacing: -.035em; }
.account-date { position: relative; z-index: 1; display: block; margin-top: 4px; color: var(--account-muted,rgba(255,255,255,.66)); font-size: 9px; }

.chart-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(310px,.55fr); grid-auto-rows: 1fr; align-items: stretch; gap: 18px; margin-bottom: 20px; }
.chart-grid.equal { grid-template-columns: repeat(2, minmax(0,1fr)); }
.chart-grid.single { grid-template-columns: minmax(0,1fr); }
.chart-panel.full { grid-column: 1 / -1; }
.chart-panel { min-height: 318px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.chart-panel-header { padding: 18px 20px 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.chart-panel-header > div { min-width: 0; }
.chart-panel-header h3 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.chart-panel-header h3, .chart-panel-header p { overflow-wrap: anywhere; }
.chart-panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.chart-panel-header > .icon-svg { flex: 0 0 auto; }
.chart-body { min-height: 238px; padding: 12px 20px 20px; display: grid; align-items: center; }
.chart-empty { min-height: 210px; display: grid; place-content: center; color: var(--muted); font-size: 11px; text-align: center; }
.line-chart { width: 100%; height: auto; overflow: visible; }
.line-chart .grid-line { stroke: #e7ecea; stroke-width: 1; }
.line-chart .area { fill: url(#cashFlowArea); opacity: .22; }
.line-chart .line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.line-chart .point { fill: #fff; stroke: var(--green); stroke-width: 2; }
.line-chart .point { cursor: crosshair; transition: r .15s, fill .15s; }
.line-chart .point:hover, .line-chart .point:focus, .line-chart .point.is-active { r: 7px; fill: var(--green-soft); outline: none; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 4px; color: var(--muted); font-size: 9px; }
.donut-layout { width: 100%; display: grid; grid-template-columns: 1fr; justify-items: center; align-items: center; gap: 18px; }
.donut { position: relative; width: 146px; height: 146px; max-width: 100%; border-radius: 50%; cursor: help; }
.donut::after { content: ""; position: absolute; inset: 25px; background: #fff; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.donut-center { position: absolute; z-index: 1; inset: 38px; display: grid; place-content: center; text-align: center; }
.donut-center strong { color: var(--ink); font-size: 15px; letter-spacing: -.03em; }
.donut-center span { margin-top: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.chart-legend { width: 100%; display: grid; gap: 11px; }
.legend-row { min-width: 0; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 8px; font-size: 10px; cursor: help; }
.legend-row i { width: 9px; height: 9px; border-radius: 3px; background: var(--legend); }
.legend-row span { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.legend-row strong { max-width: 150px; overflow: hidden; color: var(--ink); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.ranking-list { display: grid; gap: 13px; }
.ranking-row { min-width: 0; display: grid; grid-template-columns: minmax(120px,1fr) minmax(130px,2fr) auto; gap: 12px; align-items: center; cursor: help; }
.ranking-label { overflow: hidden; color: #3d4858; font-size: 10px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.ranking-track { height: 9px; overflow: hidden; background: #edf1ef; border-radius: 999px; }
.ranking-track i { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: linear-gradient(90deg, var(--bar-color,var(--blue)), color-mix(in srgb, var(--bar-color,var(--blue)) 65%, white)); }
.ranking-value { color: var(--ink); font-size: 10px; font-weight: 780; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bank-balance-overview { min-width: 0; display: grid; grid-template-columns: minmax(190px,.42fr) minmax(0,1.58fr); align-items: center; gap: 28px; }
.bank-total { min-width: 0; padding: 20px; overflow: hidden; color: #fff; background: linear-gradient(145deg,#007a33,#005825); border-radius: 16px; cursor: help; }
.bank-total span, .bank-total strong, .bank-total small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-total span { color: rgba(255,255,255,.72); font-size: 10px; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.bank-total strong { margin-top: 12px; font-size: clamp(22px,2.6vw,38px); letter-spacing: -.045em; }
.bank-total small { margin-top: 8px; color: rgba(255,255,255,.68); font-size: 9px; }
.bank-balance-list { min-width: 0; display: grid; gap: 14px; }
.bank-balance-row { min-width: 0; display: grid; grid-template-columns: 11px minmax(110px,.7fr) minmax(130px,1.4fr) minmax(90px,auto); align-items: center; gap: 11px; cursor: help; }
.bank-balance-row > i { width: 11px; height: 11px; background: var(--bank-color); border-radius: 4px; }
.bank-balance-row > span { min-width: 0; overflow: hidden; color: #3d4858; font-size: 10px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.bank-balance-row > strong { max-width: 150px; overflow: hidden; font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.bank-balance-track { height: 10px; overflow: hidden; background: #edf1ef; border-radius: 999px; }
.bank-balance-track em { display: block; height: 100%; background: var(--bank-color); border-radius: inherit; }
.chart-tooltip { position: fixed; z-index: 300; max-width: min(340px,calc(100vw - 20px)); padding: 10px 12px; overflow: visible; color: #fff; background: #12301f; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; box-shadow: 0 10px 28px rgba(0,45,20,.24); font-size: 10px; font-weight: 700; line-height: 1.45; pointer-events: none; white-space: pre-line; }

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; color: #596575; background: #f7f9f8; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 850; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #edf1ef; color: #354052; font-size: 11px; vertical-align: middle; }
tbody tr:hover { background: #fafcfc; }
tbody tr:last-child td { border-bottom: 0; }
.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.credit { color: var(--green); font-weight: 750; }
.money.debit { color: var(--red); font-weight: 750; }
.money.balance { color: var(--blue); font-weight: 760; }
.name-cell strong, .name-cell span { display: block; }
.name-cell strong { color: var(--ink); font-size: 11px; }
.name-cell span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.row-action { padding: 6px 9px; color: var(--blue); background: var(--blue-soft); border: 0; border-radius: 7px; font-size: 10px; font-weight: 750; }
.row-action:hover { background: #d9f0e2; }
.row-action.danger { color: var(--red); background: var(--red-soft); }
.row-action.selected { color: #fff; background: var(--blue); }
.row-action.is-pending, .button.is-pending, .bank-select.is-pending { opacity: .68; cursor: wait; }
.row-action.is-pending::before, .button.is-pending::before { content: ""; width: 10px; height: 10px; display: inline-block; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin .65s linear infinite; }
.payable-row-selected td { background: #f1fbf5; }
.status-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.status-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-chip.overdue { color: var(--red); background: var(--red-soft); }
.status-chip.current { color: var(--green); background: var(--green-soft); }
.status-chip.pending { color: var(--amber); background: var(--amber-soft); }
.status-chip.paid { color: var(--blue); background: var(--blue-soft); }
.status-chip.neutral { color: var(--muted); background: #eff2f1; }
.pagination { min-height: 82px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); background: #fff; }
.pagination-summary { color: var(--muted); font-size: 10px; font-weight: 680; white-space: nowrap; }
.pagination-pages { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; overflow-x: auto; }
.page-button { min-width: 42px; height: 42px; padding: 0 11px; display: grid; place-items: center; color: #315343; background: #fff; border: 1px solid #d6e1dc; border-radius: 11px; font-size: 13px; font-weight: 800; transition: color .16s, background .16s, border-color .16s, transform .16s; }
.page-button:hover:not(:disabled):not(.active) { color: var(--green); border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.page-button.active { color: #fff; background: var(--green); border-color: var(--green); box-shadow: 0 8px 18px rgba(0,149,59,.18); }
.page-button:disabled { color: #c3ceca; background: #f8faf9; cursor: not-allowed; }
.page-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page-ellipsis { width: 28px; display: grid; place-items: center; color: #8b9892; font-weight: 850; }
.empty-state { min-height: 240px; padding: 40px; display: grid; place-content: center; gap: 10px; text-align: center; color: var(--muted); }
.empty-state-icon { margin: 0 auto; width: 52px; height: 52px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 16px; font-size: 26px; }
.empty-state h3 { margin: 4px 0 0; color: var(--ink); font-size: 16px; }
.empty-state p { max-width: 420px; margin: 0; font-size: 11px; line-height: 1.55; }

.bar-list { display: grid; gap: 17px; }
.bar-row-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 10px; }
.bar-row-head strong { color: var(--ink); }
.bar-row-head span { color: var(--muted); }
.bar-track { height: 8px; display: flex; overflow: hidden; background: #edf1ef; border-radius: 999px; }
.bar-track i { display: block; min-width: 2px; height: 100%; }
.bar-overdue { background: var(--red); }
.bar-current { background: var(--green); }
.activity-list { display: grid; }
.activity-item { min-width: 0; padding: 13px 0; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid #edf1ef; }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 36px; height: 36px; padding: 9px; overflow: hidden; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 10px; line-height: 0; }
.activity-item > div { min-width: 0; }
.activity-item > div strong, .activity-item > div span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-item > div strong { font-size: 11px; }
.activity-item > div span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.activity-item time { max-width: 135px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.tabs { display: flex; gap: 4px; padding: 4px; background: #e9eeec; border-radius: 11px; }
.tab-button { min-height: 34px; padding: 7px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 10px; font-weight: 760; }
.tab-button.active { color: var(--blue); background: #fff; box-shadow: 0 2px 8px rgba(0,122,51,.08); }
.selection-bar { position: sticky; bottom: 18px; z-index: 15; margin: 18px auto 0; max-width: 780px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; background: #075b2d; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,76,35,.28); }
.selection-bar strong { font-size: 12px; }
.selection-bar span { color: rgba(255,255,255,.68); font-size: 10px; }
.selection-actions { display: flex; gap: 8px; }
.check { width: 17px; height: 17px; accent-color: var(--blue); }
.bank-select { min-width: 170px; padding: 7px 9px; border: 1px solid #ccd7d2; border-radius: 8px; background: #fff; font-size: 10px; }
.payment-scope-note { margin: 0 18px 16px; padding: 12px 14px; display: flex; align-items: center; gap: 11px; color: #075b2d; background: #edf8f1; border: 1px solid #cde8d7; border-radius: 11px; }
.payment-scope-note > .icon-svg { flex: 0 0 auto; width: 20px; height: 20px; }
.payment-scope-note strong, .payment-scope-note span { display: block; }
.payment-scope-note strong { font-size: 11px; }
.payment-scope-note span { margin-top: 3px; color: #587064; font-size: 10px; line-height: 1.45; }

.import-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 1fr; align-items: stretch; gap: 16px; margin-bottom: 20px; }
.import-card { min-width: 0; height: 100%; padding: 22px; overflow: hidden; display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.import-card > div { min-width: 0; }
.import-icon { width: 52px; height: 52px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 15px; font-size: 25px; }
.import-card h3 { margin: 2px 0 6px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.import-card p { margin: 0 0 15px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.55; }
.import-card input[type="file"] { display: none; }
.drop-zone { padding: 16px; color: var(--muted); background: #fafcfc; border: 1px dashed #bdcbc5; border-radius: 11px; font-size: 10px; text-align: center; }
.drop-zone.dragover { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 24px; display: grid; place-items: center; background: rgba(7,16,38,.55); backdrop-filter: blur(5px); }
.modal { width: min(980px, 100%); max-height: min(86vh, 900px); overflow: hidden; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-header { min-height: 82px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.035em; }
.modal-close { width: 38px; height: 38px; color: var(--muted); background: #f2f5f4; border: 0; border-radius: 10px; font-size: 24px; line-height: 1; }
.modal-close:hover { color: var(--red); background: var(--red-soft); }
.modal-body { padding: 22px 24px 28px; overflow: auto; }
.modal-form { display: grid; gap: 18px; }
.modal-form .field { margin-bottom: 0; align-content: start; }
.modal-form .field-grid { align-items: start; gap: 18px; }
.modal-actions { padding-top: 8px; display: flex; align-items: stretch; justify-content: flex-end; gap: 10px; }
.modal-actions .button { min-height: var(--control-height); }
.detail-kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 18px; }
.detail-kpi { padding: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.detail-kpi span, .detail-kpi strong { display: block; }
.detail-kpi span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.detail-kpi strong { margin-top: 7px; font-size: 16px; }
.modal-selection-note { margin: -2px 0 14px; padding: 10px 12px; color: #446054; background: var(--green-soft); border-radius: 9px; font-size: 10px; line-height: 1.45; }
.payment-detail { margin-bottom: 13px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.payment-detail summary { min-width: 0; padding: 14px 16px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; cursor: pointer; background: #fafcfc; }
.payment-detail summary div { min-width: 0; }
.payment-detail summary strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.payment-detail summary div > span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.payment-detail summary > span { max-width: 140px; overflow: hidden; color: var(--blue); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.payment-actions { padding: 13px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; border-top: 1px solid var(--line); background: #fbfdfc; }
.payment-actions .row-action.danger { min-height: 38px; margin-left: auto; padding: 7px 13px; font-size: 11px; }
.payment-print-frame { position: fixed; left: -10000px; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; }

.loading-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(247,250,249,.78); backdrop-filter: blur(4px); }
.loading-card { min-width: 210px; padding: 28px; display: grid; justify-items: center; gap: 15px; background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow-md); }
.loading-card strong { font-size: 12px; }
.spinner { width: 34px; height: 34px; border: 3px solid #d9eee1; border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 250; width: min(360px, calc(100vw - 44px)); display: grid; gap: 10px; }
.toast { padding: 14px 16px; display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: start; color: #fff; background: #075b2d; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,57,26,.26); animation: toastIn .24s ease-out; }
.toast.success { background: #075b2d; }
.toast.error { background: #8c1d18; }
.toast strong, .toast span { display: block; }
.toast strong { font-size: 11px; }
.toast span { margin-top: 3px; color: rgba(255,255,255,.72); font-size: 9px; line-height: 1.4; }
.toast button { padding: 0; color: rgba(255,255,255,.7); background: transparent; border: 0; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

.view-skeleton { display: grid; gap: 18px; }
.skeleton-block { position: relative; overflow: hidden; background: #e7ecea; border-radius: 14px; }
.skeleton-block::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); transform: translateX(-100%); animation: shimmer 1.15s infinite; }
.skeleton-heading { width: min(420px,70%); height: 34px; }
.skeleton-copy { width: min(650px,88%); height: 14px; }
.skeleton-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.skeleton-card { height: 132px; }
.skeleton-panel { height: 300px; }
@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 1240px) {
  :root { --sidebar: 218px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .account-grid { grid-template-columns: repeat(2,1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .chart-grid, .chart-grid.equal { grid-template-columns: 1fr; }
  .topbar-right .sync-state { display: none; }
}

@media (max-width: 900px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { padding: 22px; background: linear-gradient(145deg, #007a33, #004b24); }
  .mobile-auth-logo { display: block; }
  .sidebar { transform: translateX(-120%); transition: transform .22s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-collapse { display: none; }
  .app-shell.sidebar-collapsed .sidebar { width: var(--sidebar); }
  .app-shell.sidebar-collapsed .workspace { margin-left: 0; }
  .app-shell.sidebar-collapsed .side-nav { padding: 18px 12px; }
  .app-shell.sidebar-collapsed .nav-button { grid-template-columns: 28px minmax(0,1fr) auto; justify-content: initial; padding: 9px 13px; }
  .app-shell.sidebar-collapsed .nav-button > span:nth-child(2) { display: block; }
  .app-shell.sidebar-collapsed .nav-count { display: grid; }
  .app-shell.sidebar-collapsed .sidebar-user { display: grid; }
  .app-shell.sidebar-collapsed .sidebar-foot { padding: 16px; }
  .app-shell.sidebar-collapsed .logout-button { justify-content: flex-start; }
  .app-shell.sidebar-collapsed .logout-button > span { display: inline; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 35; display: none; background: rgba(7,16,38,.44); }
  .mobile-scrim.open { display: block; }
  .workspace { margin-left: 0; }
  .mobile-menu-button { display: block; }
  .topbar { height: 80px; padding: 0 18px; }
  .topbar-right .sync-state { display: none; }
  .main-content { padding: 22px 18px 42px; }
  .main-content::before { top: 79px; left: 0; }
  .import-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .auth-card { padding: 28px 22px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .topbar h1 { font-size: 20px; }
  .topbar-right .button { display: none; }
  .page-intro { align-items: stretch; flex-direction: column; }
  .intro-actions { justify-content: flex-start; }
  .bank-intro-actions { grid-template-columns: 1fr; }
  .stat-grid, .account-grid, .detail-kpis { grid-template-columns: 1fr; }
  .stat-card { min-height: 120px; }
  .filter-panel { align-items: stretch; flex-direction: column; }
  .filter-field, .filter-field.wide, .date-range-wrap { width: 100%; min-width: 0; }
  .filter-actions { width: 100%; }
  .filter-actions .button { flex: 1; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .import-card { grid-template-columns: 1fr; }
  .selection-bar { align-items: stretch; flex-direction: column; }
  .payment-actions { align-items: stretch; flex-direction: column; }
  .payment-actions .button, .payment-actions .row-action.danger { width: 100%; margin-left: 0; }
  .modal-backdrop { padding: 0; place-items: end center; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; }
  .sync-state { display: none; }
  .date-popover { position: fixed; inset: auto 12px 12px; width: auto; max-height: calc(100vh - 24px); overflow: auto; }
  .calendar-months { grid-template-columns: 1fr; }
  .calendar-month:nth-child(2) { display: none; }
  .calendar-footer { align-items: stretch; flex-direction: column; }
  .calendar-footer-actions .button { flex: 1; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .chart-legend { width: 100%; }
  .bank-balance-overview { grid-template-columns: 1fr; }
  .bank-balance-row { grid-template-columns: 11px minmax(100px,1fr) minmax(100px,1.4fr); }
  .bank-balance-row > strong { grid-column: 2 / -1; justify-self: end; margin-top: -6px; }
  .ranking-row { grid-template-columns: minmax(100px,1fr) minmax(90px,1.3fr); }
  .ranking-value { grid-column: 1 / -1; justify-self: end; margin-top: -7px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-pages { justify-content: flex-start; overflow-x: auto; padding-bottom: 3px; }
  .page-button { min-width: 40px; height: 40px; }
  .skeleton-cards { grid-template-columns: 1fr; }
  .live-date { max-width: 138px; grid-template-columns: 20px minmax(0,1fr); gap: 5px; }
  .live-date strong { font-size: 9px; }
}

@media (max-width: 420px) {
  .topbar { gap: 10px; }
  .topbar-left { gap: 8px; }
  .live-date { max-width: 105px; grid-template-columns: 1fr; }
  .live-date > .icon-svg { display: none; }
  .activity-item { grid-template-columns: 36px minmax(0,1fr); }
  .activity-item time { grid-column: 2; }
  .bank-balance-row { grid-template-columns: 11px minmax(0,1fr); }
  .bank-balance-track, .bank-balance-row > strong { grid-column: 2; }
}

@media print {
  .sidebar, .topbar, .filter-panel, .intro-actions, .panel-actions, .selection-bar { display: none !important; }
  .workspace { margin: 0; }
  .main-content { max-width: none; padding: 0; }
  .panel, .stat-card { box-shadow: none; break-inside: avoid; }
}
