/* RHENAU concept: one clear account overview and coherent task surfaces.
   Existing record values, status and action handlers remain authoritative. */
body[data-auth="ready"] {
  --ink: #142939;
  --navy: #152e40;
  --blue: #27596a;
  --paper: #f3f6f5;
  --line: #dbe5e4;
  --surface-border: #dbe5e4;
  --text-secondary: #536870;
}
body[data-auth="ready"], body[data-auth="ready"] > main { background: #f3f6f5; color: #142939; }
body[data-auth="ready"] .sidebar { background: #132b3d; }
body[data-auth="ready"] .nav button { color: #cedddd; border-radius: 12px; }
body[data-auth="ready"] .nav button.active { background: #dcece8; color: #163b49; }
body[data-auth="ready"] .topbar { background: #f3f6f5; }
body[data-auth="ready"] .content { max-width: 1280px; }
body[data-auth="ready"] .heading { margin-bottom: 25px; }
body[data-auth="ready"][data-page="overview"] .heading #eyebrow {
  margin-bottom: 6px; color: #587078; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
}
body[data-auth="ready"][data-page="overview"] .heading h1 { color: #142f40; font-size: clamp(27px, 3.2vw, 37px); font-weight: 500; letter-spacing: -.035em; line-height: 1.17; }
body[data-auth="ready"] :is(.surface-card, .card, .transfer-card, .products-category) {
  border: 1px solid #dde7e5; border-radius: 17px; background: #fff; box-shadow: 0 2px 14px rgba(21,45,56,.035);
}
body[data-auth="ready"] .app-home { display: grid; grid-template-columns: minmax(0,1.17fr) minmax(300px,.83fr); gap: 16px; align-items: stretch; }
body[data-auth="ready"] .home-account-section {
  display: flex; flex-direction: column; min-width: 0; padding: 26px; border: 1px solid #1c4050; border-radius: 19px;
  color: #f7fbfa; background: #17384a; box-shadow: 0 12px 32px rgba(21,47,61,.12);
}
body[data-auth="ready"] .home-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
body[data-auth="ready"] .home-account-overline { display: block; color: #afcbd0; font-size: 10px; font-weight: 650; letter-spacing: .12em; }
body[data-auth="ready"] .home-section-heading h2 { margin-top: 6px; color: #fff; font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
body[data-auth="ready"] .home-transfer-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px;
  border: 1px solid #a7c5c2; border-radius: 10px; background: #e2efec; color: #173c48; font-size: 12px; font-weight: 600; cursor: pointer;
}
body[data-auth="ready"] .home-transfer-action .icon { width: 16px; height: 16px; }
body[data-auth="ready"] .home-accounts { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; border: 0; border-top: 1px solid #5b7882; border-radius: 0; background: transparent; box-shadow: none; }
body[data-auth="ready"] .home-accounts .home-account,
body[data-auth="ready"] .home-accounts .home-account + .home-account {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 12px; min-height: 90px;
  padding: 15px 2px; border: 0; border-bottom: 1px solid #58727b; border-radius: 0; background: transparent; box-shadow: none; color: #fff;
}
body[data-auth="ready"] .home-accounts .home-account:hover { background: rgba(255,255,255,.045); }
body[data-auth="ready"] .home-accounts .home-account-heading { min-width: 0; align-items: center; }
body[data-auth="ready"] .home-accounts .home-account-heading strong { color: #fff; font-size: 14px; font-weight: 550; }
body[data-auth="ready"] .home-accounts .home-account-heading small { color: #c4d9db; font-size: 11px; }
body[data-auth="ready"] .home-accounts .home-account-heading > .icon { display: none; }
body[data-auth="ready"] .home-accounts .home-balance-line { margin: 0; padding: 0; justify-content: flex-end; text-align: right; }
body[data-auth="ready"] .home-accounts .home-account-balance { color: #fff; font-size: clamp(20px,2vw,27px); letter-spacing: -.03em; }
body[data-auth="ready"] .home-accounts .home-account-balance .amount-currency { color: #c4d9db; }
body[data-auth="ready"] .home-account > .account-growth-caption { grid-column: 1 / -1; color: #c4d9db; }
body[data-auth="ready"] .home-account-notes { margin: 15px 0 0; color: #c7d9d9; }
body[data-auth="ready"] .home-account-notes :is(p,span,small) { color: #c7d9d9; }
body[data-auth="ready"] .home-pending { margin: 15px 0 0; border-color: #789193; background: #f0f5ef; color: #29494d; }
body[data-auth="ready"] .home-account-section > .surface-card { background: #fff; color: #142939; }
body[data-auth="ready"] .app-home .home-activity { margin: 0; min-width: 0; }
body[data-auth="ready"] .app-home .home-activity .card-head { padding: 24px 23px; }
body[data-auth="ready"] .app-home .home-activity .activity-item { padding: 16px 23px; }
body[data-auth="ready"] .home-activity .card-head h2 { color: #193949; font-size: 17px; font-weight: 600; }
body[data-auth="ready"] .activity-icon { color: #2e615f; background: #eaf3ef; }
body[data-auth="ready"] .home-secondary { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(230px,.8fr) minmax(300px,1.2fr); gap: 16px; min-width: 0; }
body[data-auth="ready"] .home-secondary .home-products { min-height: 132px; margin: 0; padding: 22px; background: #e7f1ed; border-color: #d7e7df; }
body[data-auth="ready"] .home-secondary .home-card-pocket { margin: 0; padding: 22px; min-height: 132px; background: #fff; border-color: #dde7e5; }
body[data-auth="ready"] .home-products strong, body[data-auth="ready"] .home-card-pocket h2 { color: #183c48; }
/* Each destination shares the same hierarchy while keeping its own controls. */
body[data-auth="ready"] .account-balance-header { background: #e4efeb; border: 1px solid #d0e2db; border-radius: 18px; padding: 26px; }
body[data-auth="ready"] .account-balance-header .account-balance-value { color: #173b49; }
body[data-auth="ready"] .account-sections > [role="tablist"] { background: #e1ebe8; border-radius: 11px; }
body[data-auth="ready"] .transfer-card { border-radius: 20px; background: #fff; }
body[data-auth="ready"] .transfer-card :is(input:not([type="checkbox"]):not([type="radio"]),select), body[data-auth="ready"] .activity-search, body[data-auth="ready"] .activity-filter-selects select { border-color: #b9cccb; background-color: #fbfcfc; color: #163b48; }
body[data-auth="ready"] .btn.primary { border-color: #194153; background: #194153; color: white; }
body[data-auth="ready"] .cards-workspace .card-chooser { background: #dfeae6; border-color: #d2e1db; border-radius: 20px; }
body[data-auth="ready"] .cards-workspace .card-type-control { background: #d3e3dc; border-color: #c5d9d1; }
body[data-auth="ready"] .activity-totals { background: #e4efeb; border-color: #d0e2db; }
body[data-auth="ready"] .activity-day > h3 { background: #f1f6f4; color: #536c67; }
body[data-auth="ready"] .profile-page .settings-profile { background: #e4efeb; border-color: #d0e2db; }
body[data-auth="ready"] .profile-page .profile-inbox { background: #fff; border-color: #dce7e3; }
body[data-auth="ready"] .products-icon { color: #2d615f; background: #e8f1ed; }
body[data-auth="ready"] :focus-visible { outline: 3px solid #4c8290; outline-offset: 3px; }
@media (max-width: 1000px) {
  body[data-auth="ready"] .app-home { grid-template-columns: minmax(0,1fr); }
  body[data-auth="ready"] .home-secondary { grid-column: 1; }
}
@media (max-width: 760px) {
  body[data-auth="ready"] .mobile-tabs { background: #fff; border-color: #d7e3df; box-shadow: 0 8px 26px rgba(14,44,51,.12); }
  body[data-auth="ready"] .mobile-tabs:before { background: #dfeee8; }
  body[data-auth="ready"] .mobile-tabs button { color: #536c70; }
  body[data-auth="ready"] .mobile-tabs button.active { color: #153b48; }
  body[data-auth="ready"] .home-account-section { padding: 21px 19px; border-radius: 17px; }
  body[data-auth="ready"] .home-section-heading { margin-bottom: 17px; }
  body[data-auth="ready"] .home-accounts .home-account, body[data-auth="ready"] .home-accounts .home-account + .home-account { min-height: 85px; padding: 14px 2px; }
  body[data-auth="ready"] .home-accounts .home-account-balance { font-size: clamp(18px,5vw,24px); }
  body[data-auth="ready"] .home-secondary { grid-template-columns: minmax(0,1fr); gap: 12px; }
  body[data-auth="ready"] .home-secondary .home-products { min-height: 82px; }
  body[data-auth="ready"] .content { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  body[data-auth="ready"] .home-accounts .home-account, body[data-auth="ready"] .home-accounts .home-account + .home-account { grid-template-columns: minmax(0,1fr); gap: 9px; }
  body[data-auth="ready"] .home-accounts .home-balance-line { justify-content: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: no-preference) {
  body[data-auth="ready"] :is(.home-account,.home-transfer-action,.home-products,.profile-inbox,.activity-item,.btn) { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s ease; }
  body[data-auth="ready"] :is(.home-transfer-action,.home-products,.profile-inbox,.btn):active { transform: scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-auth="ready"] :is(.home-account,.home-transfer-action,.home-products,.profile-inbox,.activity-item,.btn) { transition: none; }
}
@media (forced-colors: active) {
  body[data-auth="ready"] .home-account-section, body[data-auth="ready"] .home-accounts .home-account { color: CanvasText; background: Canvas; border-color: CanvasText; box-shadow: none; }
  body[data-auth="ready"] :is(.home-account-overline,.home-section-heading h2,.home-account-heading strong,.home-account-heading small,.home-account-balance,.home-account-notes,.home-account-notes p,.home-account-notes span) { color: CanvasText; }
}
/* Keep the account section title legible against its dark panel. */
body[data-auth="ready"] .app-home .home-section-heading h2 { color: #fff; }

/* Activity keeps search and account selection in view; secondary filters open on demand. */
body[data-auth="ready"] .activity-toolbar { gap: 14px; }
body[data-auth="ready"] .activity-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
body[data-auth="ready"] .activity-search,
body[data-auth="ready"] .activity-filter-selects select { border-color: #e0dbd3; background: #fff; color: #252d33; }
body[data-auth="ready"] .activity-filter-disclosure { position: relative; }
body[data-auth="ready"] .activity-filter-disclosure > summary {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; min-width: 88px;
  padding: 0 16px; border: 1px solid #e0dbd3; border-radius: 8px; background: #fff; color: #252d33;
  font-size: 13px; font-weight: 600; list-style: none; cursor: pointer;
}
body[data-auth="ready"] .activity-filter-disclosure > summary::-webkit-details-marker { display: none; }
body[data-auth="ready"] .activity-filter-count { color: #906e4d; font-size: 18px; line-height: 1; }
body[data-auth="ready"] .activity-filter-disclosure .activity-filter-selects {
  position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; display: grid;
  grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(260px, calc(100vw - 36px));
  padding: 16px; border: 1px solid #e0dbd3; border-radius: 12px; background: #fff;
  box-shadow: 0 10px 28px rgba(32, 36, 37, .12);
}
body[data-auth="ready"] .activity-filter-disclosure .activity-filter-selects label { min-width: 0; color: #6c6963; }
body[data-auth="ready"] .activity-totals { background: #f0ede8; border-color: #e1dbd2; }
body[data-auth="ready"] .activity-totals-heading h2 { color: #252d33; }
body[data-auth="ready"] .activity-day > h3 { background: #f6f4f0; color: #6d6962; }
@media (max-width: 760px) {
  body[data-auth="ready"] .activity-filters { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  body[data-auth="ready"] .activity-filter-disclosure > summary { min-width: 78px; padding: 0 12px; }
}
@media (forced-colors: active) {
  body[data-auth="ready"] .activity-filter-disclosure > summary,
  body[data-auth="ready"] .activity-filter-disclosure .activity-filter-selects { color: CanvasText; background: Canvas; border-color: CanvasText; }
}
