/* RHENAU 103: client-portal visual system. All content and controls stay data-driven. */
:root {
  --ink: #142d3a;
  --navy: #153448;
  --blue: #23546b;
  --paper: #f2f3ef;
  --muted: #52656b;
  --line: #dce5e2;
  --surface-border: #dce5e2;
  --text-secondary: #52656b;
}
body[data-auth="ready"] > main,
body[data-auth="ready"] { background: var(--paper); color: var(--ink); }
body[data-auth="ready"] .sidebar { background: #122e3d; }
body[data-auth="ready"] .nav button { border-radius: 10px; color: #d1e2e4; }
body[data-auth="ready"] .nav button.active { background: #e3eeea; color: #143548; }
body[data-auth="ready"] .topbar { background: var(--paper); border: 0; box-shadow: none; }
body[data-auth="ready"] .heading h1 { color: #163848; font-weight: 500; letter-spacing: -.04em; }
body[data-auth="ready"] .heading .sub { color: #52656b; }
body[data-auth="ready"] :is(.surface-card, .card, .transfer-card, .products-category) {
  border: 1px solid #dce5e2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(23, 55, 63, .035);
}
body[data-auth="ready"] :is(.home-section-heading h2, .card-head h2, .profile-page .settings-card h2) {
  color: #173847;
  font-weight: 600;
  letter-spacing: -.025em;
}
/* The two accounts are equally important and keep the same structure. */
body[data-auth="ready"] .home-accounts { gap: 12px; }
body[data-auth="ready"] .home-accounts .home-account,
body[data-auth="ready"] .home-accounts .home-account + .home-account {
  min-height: 174px;
  padding: 23px 24px;
  border: 1px solid #244e60;
  border-radius: 16px;
  background: #173b4d;
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 59, 77, .1);
}
body[data-auth="ready"] .home-accounts .home-account:hover { background: #204b5d; border-color: #527987; }
body[data-auth="ready"] .home-account-heading strong,
body[data-auth="ready"] .home-accounts .home-account-balance { color: #fff; }
body[data-auth="ready"] .home-account-heading small,
body[data-auth="ready"] .home-account-heading > .icon,
body[data-auth="ready"] .home-accounts .home-account-balance .amount-currency,
body[data-auth="ready"] .home-account > .account-growth-caption,
body[data-auth="ready"] .home-account .account-growth-caption > small { color: #d4e4e4; }
body[data-auth="ready"] .home-account-heading strong { font-size: 15px; }
body[data-auth="ready"] .home-account-balance { font-size: clamp(27px, 3vw, 36px); }
body[data-auth="ready"] .home-account-notes { color: #52656b; }
body[data-auth="ready"] .home-products { margin-top: 12px; }
body[data-auth="ready"] .home-pending { border-radius: 12px; }
body[data-auth="ready"] .home-card-pocket { border-radius: 16px; }
body[data-auth="ready"] .home-activity { overflow: hidden; }
body[data-auth="ready"] .activity-item { border-color: #e6edeb; }
body[data-auth="ready"] .activity-icon { background: #eef4f1; color: #315d58; }
body[data-auth="ready"] .activity-item:hover { background: #f6faf8; }
/* Account detail and the current/investment sections use a shared reading order. */
body[data-auth="ready"] .account-balance-header {
  margin: 12px 0 20px;
  padding: 24px;
  border: 1px solid #d7e4e1;
  border-radius: 16px;
  background: #e9f0ed;
}
body[data-auth="ready"] .account-balance-header > span,
body[data-auth="ready"] .account-balance-header > small,
body[data-auth="ready"] .account-header-meta > span { color: #52665f; }
body[data-auth="ready"] .account-balance-header .account-balance-value { color: #143a48; }
body[data-auth="ready"] .account-header-meta { border-color: #c8dcd5; }
body[data-auth="ready"] .account-sections { background: var(--paper); }
body[data-auth="ready"] .account-sections > [role="tablist"] { background: #dfe9e5; }
body[data-auth="ready"] .account-sections [aria-selected="true"] { color: #143d49; }
/* Forms, profile and gallery share the same controls and surface language. */
body[data-auth="ready"] .transfer-card { max-width: 660px; padding: 30px; }
body[data-auth="ready"] .transfer-card h2 { color: #173847; }
body[data-auth="ready"] .transfer-card :is(input:not([type="radio"]):not([type="checkbox"]), select),
body[data-auth="ready"] .activity-search,
body[data-auth="ready"] .activity-filter-selects select {
  border-color: #b6ccc7;
  border-radius: 10px;
  background-color: #fbfcfb;
  color: #173847;
}
body[data-auth="ready"] .transfer-card :is(input[type="checkbox"],input[type="radio"]) { accent-color: #275a65; }
body[data-auth="ready"] .btn.primary { background: #183e50; border-color: #183e50; color: #fff; }
body[data-auth="ready"] .btn.primary:hover { background: #28586a; border-color: #28586a; }
body[data-auth="ready"] .card-type-control { border: 1px solid #d9e6e1; background: #e5eeea; border-radius: 14px; }
body[data-auth="ready"] .card-delivery-panel { border-radius: 16px; }
body[data-auth="ready"] .profile-page .profile-group-heading { color: #4a645f; font-size: 12px; }
body[data-auth="ready"] .profile-page .profile-inbox { margin-bottom: 8px; }
body[data-auth="ready"] .profile-inbox > .icon:first-child { color: #2f675e; }
body[data-auth="ready"] .products-category summary { color: #193e4a; }
body[data-auth="ready"] .products-icon { background: #edf4ef; color: #35675e; }
body[data-auth="ready"] :focus-visible { outline: 3px solid #316e77; outline-offset: 3px; }

/* Layout: compact account tiles, distinct task surfaces and an ordered profile. */
body[data-auth="ready"] .content { max-width: 1350px; }
body[data-auth="ready"] .heading { margin-bottom: 28px; }
body[data-auth="ready"][data-page="overview"] .heading h1 { max-width: 23ch; font-size: clamp(27px, 3.4vw, 36px); line-height: 1.13; }
body[data-auth="ready"] .app-home { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 28px; }
body[data-auth="ready"] .home-account-section { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; }
body[data-auth="ready"] .home-section-heading { margin: 0 0 12px; }
body[data-auth="ready"] .home-section-heading h2 { font-size: 15px; letter-spacing: -.01em; }
body[data-auth="ready"] .home-accounts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body[data-auth="ready"] .home-accounts .home-account,
body[data-auth="ready"] .home-accounts .home-account + .home-account {
  display: flex; flex-direction: column; min-width: 0; min-height: 166px; padding: 19px;
}
body[data-auth="ready"] .home-accounts .home-account-heading { align-items: flex-start; width: 100%; }
body[data-auth="ready"] .home-accounts .home-account-heading strong { font-size: 13px; }
body[data-auth="ready"] .home-accounts .home-account-heading small { color: #d4e4e4; font-size: 10px; }
body[data-auth="ready"] .home-accounts .home-balance-line { margin: auto 0 0; padding-top: 18px; align-items: flex-end; }
body[data-auth="ready"] .home-accounts .home-account-balance { font-size: clamp(20px, 2.3vw, 29px); }
body[data-auth="ready"] .home-accounts .home-account-balance .amount-number { min-width: 0; }
body[data-auth="ready"] .home-account-notes { margin: 10px 2px 16px; }
body[data-auth="ready"] .home-products { min-height: 72px; margin-top: 10px; padding: 15px 18px; }
body[data-auth="ready"] .home-card-pocket { margin-top: 10px; min-height: 132px; padding: 20px; background: #e5ede8; border-color: #d0dfd8; }
body[data-auth="ready"] .app-home .home-activity { margin: 27px 0 0; }
body[data-auth="ready"] .app-home .home-activity .card-head { padding: 22px; }
body[data-auth="ready"] .app-home .home-activity .activity-item { padding: 18px 22px; }
body[data-auth="ready"] .activity-icon { border-radius: 12px; }
body[data-auth="ready"] .account-switcher select { border-radius: 10px; border-color: #b6ccc7; background-color: #fff; }
body[data-auth="ready"] .account-balance-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
body[data-auth="ready"] .account-header-meta button { min-height: 44px; border-radius: 9px; background: #fff; }
body[data-auth="ready"] .account-sections > [role="tablist"] { padding: 5px; }
body[data-auth="ready"] .account-sections [role="tab"] { min-height: 44px; }
body[data-auth="ready"] .transfer-card { border-radius: 20px; }
body[data-auth="ready"] .transfer-card h2 { margin-bottom: 22px; font-size: 22px; }
body[data-auth="ready"] .transfer-card form > label:not(.transfer-confirm) { color: #35544e; font-size: 12px; font-weight: 600; }
body[data-auth="ready"] .transfer-card #transfer-amount { font-size: 20px; font-variant-numeric: tabular-nums; }
body[data-auth="ready"] .transfer-target { gap: 8px; border: 0; padding: 12px 0 3px; }
body[data-auth="ready"] .transfer-target legend { color: #35544e; font-size: 12px; font-weight: 600; }
body[data-auth="ready"] .transfer-target label { flex: 1 1 170px; padding: 9px 12px; border: 1px solid #d1e1dc; border-radius: 10px; background: #f5f9f7; }
body[data-auth="ready"] .transfer-card form > .btn { min-height: 52px; border-radius: 10px; }
body[data-auth="ready"] .cards-workspace .card-chooser { border: 1px solid #cfdfd9; border-radius: 18px; background: #e4eee9; }
body[data-auth="ready"] .cards-workspace .card-type-control { background: #d5e5de; border-color: #c5dbd2; }
body[data-auth="ready"] .cards-workspace .card-gallery-controls > button { border-radius: 50%; background: #fff; border-color: #cadfd6; }
body[data-auth="ready"] .cards-workspace .card-delivery-panel { border-radius: 18px; }
body[data-auth="ready"] .activity-totals { background: #e8f0ec; border-color: #d3e3dc; }
body[data-auth="ready"] .activity-currency-total { border-color: #ccddd5; }
body[data-auth="ready"] .payments-card { overflow: hidden; }
body[data-auth="ready"] .activity-day > h3 { padding: 11px 22px; background: #f3f7f4; border-color: #e2ebe5; color: #52685e; }
body[data-auth="ready"] .profile-page { max-width: 800px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
body[data-auth="ready"] .profile-page > :not(.profile-inbox) { grid-column: 1 / -1; }
body[data-auth="ready"] .profile-page .settings-profile { margin: 0; padding: 24px; background: #e4eee8; border: 1px solid #d2e1d8; }
body[data-auth="ready"] .profile-page .profile-group-heading { margin: 17px 3px 0; }
body[data-auth="ready"] .profile-page .profile-inbox { min-height: 88px; margin: 0; padding: 17px; gap: 12px; }
body[data-auth="ready"] .profile-page .profile-inbox strong { font-size: 14px; }
body[data-auth="ready"] .profile-page .profile-inbox small { line-height: 1.45; }
body[data-auth="ready"] .profile-page .profile-inbox > .icon:last-child { display: none; }
body[data-auth="ready"] .profile-page .settings-card { margin: 0; }
body[data-auth="ready"] .profile-page .profile-signout { margin-top: 8px; }
@media (max-width: 1000px) {
  body[data-auth="ready"] .app-home { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body[data-auth="ready"] .app-home .home-activity { margin: 0; }
}
@media (max-width: 760px) {
  body[data-auth="ready"] .topbar { background: var(--paper); }
  body[data-auth="ready"] .mobile-tabs {
    left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom)); width: auto; padding: 5px;
    border: 1px solid #d9e4e1; border-radius: 20px; background: #fff;
    box-shadow: 0 8px 24px rgba(20, 48, 54, .11);
  }
  body[data-auth="ready"] .mobile-tabs:before { top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 5); border-radius: 15px; }
  body[data-auth="ready"] .mobile-tabs button { min-height: 54px; }
  body[data-auth="ready"] .mobile-tabs:before { background: #e5f0eb; }
  body[data-auth="ready"] .mobile-tabs button { color: #52686b; }
  body[data-auth="ready"] .mobile-tabs button.active { color: #153e49; }
  body[data-auth="ready"] .home-accounts .home-account,
  body[data-auth="ready"] .home-accounts .home-account + .home-account { min-height: 145px; padding: 16px; }
  body[data-auth="ready"] .home-accounts .home-account-balance { font-size: clamp(19px, 5vw, 24px); }
  body[data-auth="ready"] .home-accounts .home-account-heading { gap: 4px; }
  body[data-auth="ready"] .home-accounts .home-account-heading > .icon { width: 14px; height: 14px; }
  body[data-auth="ready"] .home-account-notes { margin-bottom: 12px; }
  body[data-auth="ready"] .content { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  body[data-auth="ready"] .account-balance-header { padding: 20px; }
  body[data-auth="ready"] .transfer-card { padding: 22px 18px; }
}
@media (max-width: 360px) {
  body[data-auth="ready"] .home-accounts { grid-template-columns: minmax(0, 1fr); }
  body[data-auth="ready"] .home-accounts .home-account,
  body[data-auth="ready"] .home-accounts .home-account + .home-account { min-height: 120px; }
  body[data-auth="ready"] .profile-page { grid-template-columns: minmax(0, 1fr); }
  body[data-auth="ready"] .profile-page > :not(.profile-inbox) { grid-column: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  body[data-auth="ready"] :is(.home-account, .profile-inbox, .activity-item, .btn, .products-category summary) {
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  }
  body[data-auth="ready"] :is(.home-account, .profile-inbox, .btn):active { transform: scale(.985); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-auth="ready"] :is(.home-account, .profile-inbox, .activity-item, .btn, .products-category summary) { transition: none; }
}
@media (forced-colors: active) {
  body[data-auth="ready"] .home-accounts .home-account,
  body[data-auth="ready"] .home-accounts .home-account + .home-account,
  body[data-auth="ready"] :is(.surface-card, .card, .transfer-card, .products-category, .account-balance-header) {
    background: Canvas; color: CanvasText; border: 1px solid CanvasText; box-shadow: none;
  }
  body[data-auth="ready"] .home-account :is(strong, small, .home-account-balance, .amount-currency, .icon),
  body[data-auth="ready"] .account-balance-header .account-balance-value { color: CanvasText; }
}
