/* Authenticated client workspace shell.
   This file owns only navigation/content geometry, never page components. */

body[data-scope="app"][data-auth] {
  --workspace-rail: 252px;
  --workspace-navy: #071b31;
  --workspace-blue: #345f7f;
  --client-blue-700: #345f7f;
  --client-blue-100: #edf2f5;
  --workspace-canvas: #f3f6f8;
  --workspace-line: #dfe7ec;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--workspace-canvas) !important;
  font-family: "IBM Plex Sans", Arial, sans-serif !important;
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] *,
body[data-scope="app"][data-auth] *::before,
body[data-scope="app"][data-auth] *::after {
  box-sizing: border-box;
}

body[data-scope="app"][data-auth] .site-header,
body[data-scope="app"][data-auth] .site-header * {
  font-weight: 400 !important;
}

/* Shared authenticated page language. Page-specific CSS may refine layout, but
   these rules keep typography, controls and surface depth consistent. */
body[data-scope="app"][data-auth] h1,
body[data-scope="app"][data-auth] h2,
body[data-scope="app"][data-auth] h3,
body[data-scope="app"][data-auth] h4,
body[data-scope="app"][data-auth] h5,
body[data-scope="app"][data-auth] h6,
body[data-scope="app"][data-auth] strong,
body[data-scope="app"][data-auth] b,
body[data-scope="app"][data-auth] .ui-title,
body[data-scope="app"][data-auth] .card-title,
body[data-scope="app"][data-auth] .loan-panel__title,
body[data-scope="app"][data-auth] .transfer-title,
body[data-scope="app"][data-auth] .review-title,
body[data-scope="app"][data-auth] .kyc-title {
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] main.page-content > .container > .page-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 !important;
}

body[data-scope="app"][data-auth] main.page-content > .container > .page-content > .container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body[data-scope="app"][data-auth] .page-titlebar,
body[data-scope="app"][data-auth] .page-head,
body[data-scope="app"][data-auth] .page-subhead {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

body[data-scope="app"][data-auth] .page-titlebar,
body[data-scope="app"][data-auth] .page-head {
  margin: 0;
  padding: 0;
}

body[data-scope="app"][data-auth] .page-titlebar .ui-title,
body[data-scope="app"][data-auth] .page-head .ui-title {
  display: flex;
  min-width: 0;
  margin: 0;
  align-items: center;
  gap: 11px;
  color: var(--workspace-navy) !important;
  font-size: clamp(28px, 2.35vw, 34px) !important;
  line-height: 1.08 !important;
  letter-spacing: -.043em !important;
}

body[data-scope="app"][data-auth][data-page="kyc"] .page-head .ui-title,
body[data-scope="app"][data-auth][data-page="kyc"] .page-titlebar .ui-title {
  font-size: clamp(26px,2.05vw,30px) !important;
}

body[data-scope="app"][data-auth] .title-ico,
body[data-scope="app"][data-auth] .loan-panel__title > .ico-wrap,
body[data-scope="app"][data-auth] .transfer-title__ico,
body[data-scope="app"][data-auth] .review-ico,
body[data-scope="app"][data-auth] .pr3-nav__ico,
body[data-scope="app"][data-auth] .pr3-tab__ico,
body[data-scope="app"][data-auth] .file-uploader-ico {
  display: inline-flex !important;
  width: 21px !important;
  height: 21px !important;
  min-width: 0 !important;
  padding: 0 !important;
  flex: 0 0 21px;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--workspace-blue) !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: 0;
}

body[data-scope="app"][data-auth] .title-ico svg,
body[data-scope="app"][data-auth] .loan-panel__title > .ico-wrap svg,
body[data-scope="app"][data-auth] .transfer-title__ico svg,
body[data-scope="app"][data-auth] .review-ico svg,
body[data-scope="app"][data-auth] .pr3-nav__ico svg,
body[data-scope="app"][data-auth] .pr3-tab__ico svg,
body[data-scope="app"][data-auth] .file-uploader-ico svg {
  display: block;
  width: 20px !important;
  height: 20px !important;
  stroke-width: 1.5;
}

body[data-scope="app"][data-auth] .page-subhead {
  margin: 12px 0 24px;
  align-items: center;
}

body[data-scope="app"][data-auth] .page-intro {
  max-width: 720px;
  margin: 0;
  color: #657786;
  font-size: 12.5px;
  line-height: 1.55;
}

body[data-scope="app"][data-auth] .page-actions,
body[data-scope="app"][data-auth] .wz-actions,
body[data-scope="app"][data-auth] .form-actions,
body[data-scope="app"][data-auth] .kyc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px !important;
}

body[data-scope="app"][data-auth] .btn {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: 40px;
  min-height: 40px !important;
  margin: 0;
  padding: 0 13px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 1px solid #ccd7df !important;
  border-radius: 4px !important;
  color: #223b51 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transform: none !important;
}

body[data-scope="app"][data-auth] .btn.small {
  height: 36px;
  min-height: 36px !important;
  padding-inline: 11px !important;
  font-size: 12px !important;
}

body[data-scope="app"][data-auth] .btn.primary {
  border-color: var(--workspace-navy) !important;
  color: #fff !important;
  background: var(--workspace-navy) !important;
}

body[data-scope="app"][data-auth] .btn.ghost,
body[data-scope="app"][data-auth] .btn.btn--soft {
  color: #2d475e !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth] .btn:hover {
  border-color: #9eb0bd !important;
  color: var(--workspace-navy) !important;
  background: #f7f9fa !important;
}

body[data-scope="app"][data-auth] .btn.primary:hover {
  border-color: #0d2c4a !important;
  color: #fff !important;
  background: #0d2c4a !important;
}

body[data-scope="app"][data-auth] .btn .ico-wrap,
body[data-scope="app"][data-auth] .btn__ico {
  display: inline-flex !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 0 !important;
  color: currentColor !important;
  background: transparent !important;
  line-height: 0;
}

body[data-scope="app"][data-auth] .btn .ico-wrap svg,
body[data-scope="app"][data-auth] .btn__ico svg {
  display: block;
  width: 17px !important;
  height: 17px !important;
  stroke-width: 1.55;
  transform: none !important;
}

body[data-scope="app"][data-auth] .card,
body[data-scope="app"][data-auth] .loan-panel,
body[data-scope="app"][data-auth] .transfer-card,
body[data-scope="app"][data-auth] .convert-card,
body[data-scope="app"][data-auth] .review-card,
body[data-scope="app"][data-auth] .status-card,
body[data-scope="app"][data-auth] .pr3-panel,
body[data-scope="app"][data-auth] .pr3-nav,
body[data-scope="app"][data-auth] .chat,
body[data-scope="app"][data-auth] .kyc-form {
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth] .card .card,
body[data-scope="app"][data-auth] .loan-panel .card,
body[data-scope="app"][data-auth] .transfer-card .card,
body[data-scope="app"][data-auth] .convert-card .card,
body[data-scope="app"][data-auth] .review-card .card,
body[data-scope="app"][data-auth] .pr3-panel .card {
  padding-inline: 0 !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth] .card-title,
body[data-scope="app"][data-auth] .loan-panel__title,
body[data-scope="app"][data-auth] .transfer-title,
body[data-scope="app"][data-auth] .review-title,
body[data-scope="app"][data-auth] .kyc-title {
  color: var(--workspace-navy) !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  letter-spacing: -.02em !important;
}

body[data-scope="app"][data-auth] .input,
body[data-scope="app"][data-auth] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body[data-scope="app"][data-auth] select,
body[data-scope="app"][data-auth] textarea {
  width: 100%;
  min-height: 44px !important;
  padding: 9px 11px !important;
  border: 1px solid #cbd6de !important;
  border-radius: 4px !important;
  color: var(--workspace-navy) !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.35;
  outline: none;
}

body[data-scope="app"][data-auth] textarea { min-height: 112px !important; resize: vertical; }

body[data-scope="app"][data-auth] .input:hover,
body[data-scope="app"][data-auth] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
body[data-scope="app"][data-auth] select:hover,
body[data-scope="app"][data-auth] textarea:hover {
  border-color: #9fb0bd !important;
}

body[data-scope="app"][data-auth] .input:focus,
body[data-scope="app"][data-auth] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
body[data-scope="app"][data-auth] select:focus,
body[data-scope="app"][data-auth] textarea:focus {
  border-color: var(--workspace-blue) !important;
  box-shadow: 0 0 0 2px rgba(23, 89, 143, .11) !important;
}

body[data-scope="app"][data-auth] .label,
body[data-scope="app"][data-auth] label:not(.checkline) {
  color: #506577;
  font-size: 11.5px;
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] .form-grid {
  gap: 20px !important;
}

body[data-scope="app"][data-auth] .divider,
body[data-scope="app"][data-auth] .ui-sep,
body[data-scope="app"][data-auth] .tr-stepper-divider,
body[data-scope="app"][data-auth] .kyc-stepper-divider {
  height: 1px !important;
  margin: 24px 0 !important;
  border: 0 !important;
  background: var(--workspace-line) !important;
}

body[data-scope="app"][data-auth] .sys-note,
body[data-scope="app"][data-auth] .acc-alert,
body[data-scope="app"][data-auth] .alert {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth] .sys-ico,
body[data-scope="app"][data-auth] .acc-alert__ico {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth] .tr-step-iconWrap,
body[data-scope="app"][data-auth] .kyc-step-iconWrap {
  border: 0 !important;
  border-radius: 0 !important;
  color: #8a99a5 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth] .tr-step-item.active .tr-step-iconWrap,
body[data-scope="app"][data-auth] .tr-step-item.completed .tr-step-iconWrap,
body[data-scope="app"][data-auth] .kyc-step-item.active .kyc-step-iconWrap,
body[data-scope="app"][data-auth] .kyc-step-item.completed .kyc-step-iconWrap {
  color: var(--workspace-blue) !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth] .file-uploader-ui,
body[data-scope="app"][data-auth] .upload-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth] .file-uploader-ui {
  border-top: 1px solid var(--workspace-line) !important;
  border-bottom: 1px solid var(--workspace-line) !important;
}

/* Accounts is a master/detail workspace, not two nested cards. */
body[data-scope="app"][data-auth][data-page="accounts"] .ac-shell {
  gap: 1px !important;
  align-items: start;
  background: var(--workspace-line) !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-list,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-detail {
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__main,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__left,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__meta,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__name,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__sub,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-detail,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-detail__headMain,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-kv,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-activity {
  text-align: left !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__balance,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-balance__v,
body[data-scope="app"][data-auth][data-page="accounts"] .ta-r {
  text-align: right !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-balance {
  gap: 0 !important;
  border-top: 1px solid var(--workspace-line) !important;
  border-bottom: 1px solid var(--workspace-line) !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-balance__item {
  border: 0 !important;
  border-right: 1px solid var(--workspace-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-balance__item:last-child {
  border-right: 0 !important;
}

body[data-scope="app"][data-auth][data-page="profile"] .pr3-shell {
  gap: 1px !important;
  background: var(--workspace-line) !important;
}

body[data-scope="app"][data-auth][data-page="profile"] .pr3-nav,
body[data-scope="app"][data-auth][data-page="profile"] .pr3-panel {
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
}

@media (min-width: 761px) {
  body[data-scope="app"][data-auth] .site-header {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1050;
    display: block !important;
    width: var(--workspace-rail) !important;
    height: 100dvh;
    min-height: 100vh !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  body[data-scope="app"][data-auth] .site-header .header-inner {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 30px 24px 24px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    overflow: visible !important;
  }

  body[data-scope="app"][data-auth] .site-header .logo {
    display: inline-flex !important;
    width: max-content;
    min-height: 44px !important;
    margin: 0 10px 34px !important;
    padding: 0 !important;
    align-items: center;
    color: var(--workspace-navy) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    letter-spacing: -.045em !important;
  }

  body[data-scope="app"][data-auth] .site-header .logo::after {
    content: "" !important;
    display: none !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link {
    position: relative;
    display: flex !important;
    width: 100% !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #657585 !important;
    background: transparent !important;
    font-size: 13.5px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: color 160ms ease !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link::after {
    content: "";
    position: absolute;
    top: 11px !important;
    bottom: 11px !important;
    left: 0 !important;
    width: 2px !important;
    height: auto !important;
    background: var(--workspace-navy) !important;
    transform: scaleY(0) !important;
    transform-origin: bottom;
    transition: transform 170ms ease !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link:hover,
  body[data-scope="app"][data-auth] .site-header .nav-link.active {
    color: var(--workspace-navy) !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link:hover::after,
  body[data-scope="app"][data-auth] .site-header .nav-link.active::after {
    transform: scaleY(1) !important;
    transform-origin: top;
  }

  body[data-scope="app"][data-auth] .site-header .nav-ico {
    display: inline-flex !important;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    color: #718292 !important;
    line-height: 0;
    opacity: 1 !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-ico svg {
    display: block;
    width: 19px !important;
    height: 19px !important;
    stroke-width: 1.55;
    transform: none !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link.active .nav-ico {
    color: var(--workspace-blue) !important;
  }

  body[data-scope="app"][data-auth] .site-header .header-actions {
    position: fixed !important;
    top: 20px !important;
    right: 32px !important;
    z-index: 1080;
    display: flex !important;
    width: auto !important;
    height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 3px !important;
    border: 0 !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth] .site-header .notif-trigger,
  body[data-scope="app"][data-auth] .site-header .profile-trigger {
    display: inline-flex !important;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 0 !important;
    color: #526779 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-scope="app"][data-auth] .site-header .notif-trigger:hover,
  body[data-scope="app"][data-auth] .site-header .profile-trigger:hover {
    color: var(--workspace-navy) !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth] .site-header .notif-dropdown,
  body[data-scope="app"][data-auth] .site-header .profile-dropdown {
    top: calc(100% + 8px) !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: 0 22px 60px rgba(7, 27, 49, .16) !important;
  }

  body[data-scope="app"][data-auth] main.page-content {
    position: relative;
    width: auto !important;
    min-width: 0;
    margin-left: var(--workspace-rail) !important;
    padding: 88px 0 70px !important;
  }

  body[data-scope="app"][data-auth] main.page-content::before {
    content: "";
    position: fixed;
    z-index: 1035;
    top: 0;
    right: 0;
    left: var(--workspace-rail);
    height: 73px;
    border-bottom: 1px solid rgba(7, 27, 49, .08);
    background: rgba(243, 246, 248, .94);
    backdrop-filter: blur(14px);
    pointer-events: none;
  }

  body[data-scope="app"][data-auth] main.page-content > .container {
    width: min(calc(100% - 64px), 1240px) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  body[data-scope="app"][data-auth] .main-footer {
    width: auto;
    margin-left: var(--workspace-rail) !important;
  }

  body[data-scope="app"][data-auth] .main-footer .container {
    width: min(calc(100% - 64px), 1240px) !important;
    max-width: 1240px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }
}

/* Compact authenticated footer: all destinations remain available without
   competing with the working area above it. */
body[data-scope="app"][data-auth] .main-footer {
  margin-top: 0 !important;
  border-top: 1px solid var(--workspace-line) !important;
  color: #71818f !important;
  background: #eef3f6 !important;
}

body[data-scope="app"][data-auth] .footer-top {
  padding: 34px 0 28px !important;
}

body[data-scope="app"][data-auth] .footer-inner {
  display: grid;
  grid-template-columns: minmax(250px, 1.25fr) repeat(3, minmax(140px, .65fr));
  gap: clamp(28px, 3.3vw, 46px) !important;
}

body[data-scope="app"][data-auth] .footer-logo-img {
  width: 28px;
  height: 28px;
}

body[data-scope="app"][data-auth] .footer-bankname {
  color: var(--workspace-navy) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] .footer-tagline,
body[data-scope="app"][data-auth] .footer-desc,
body[data-scope="app"][data-auth] .footer-meta,
body[data-scope="app"][data-auth] .footer-item,
body[data-scope="app"][data-auth] .footer-links a,
body[data-scope="app"][data-auth] .footer-legal {
  color: #71818f !important;
  font-size: 10.5px !important;
  font-weight: 400 !important;
  line-height: 1.55;
}

body[data-scope="app"][data-auth] .footer-desc {
  max-width: 380px;
  margin: 13px 0 !important;
}

body[data-scope="app"][data-auth] .footer-legal {
  margin-top: 11px !important;
}

body[data-scope="app"][data-auth] .footer-acc__summary {
  color: var(--workspace-navy) !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] .footer-list,
body[data-scope="app"][data-auth] .footer-links {
  margin-top: 11px !important;
}

body[data-scope="app"][data-auth] .footer-links li + li {
  margin-top: 5px !important;
}

body[data-scope="app"][data-auth] .footer-ico,
body[data-scope="app"][data-auth] .footer-msg {
  color: var(--workspace-blue) !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth] .footer-bottom {
  border-top: 1px solid rgba(7, 27, 49, .08) !important;
}

body[data-scope="app"][data-auth] .footer-bottom-inner {
  min-height: 44px !important;
}

body[data-scope="app"][data-auth] .footer-copy {
  color: #82909b !important;
  font-size: 9.5px !important;
}

@media (max-width: 760px) {
  body[data-scope="app"][data-auth] {
    padding-top: 64px;
  }

  body[data-scope="app"][data-auth] .site-header {
    position: fixed !important;
    inset: 0 0 auto !important;
    z-index: 1100;
    width: 100% !important;
    min-height: 64px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(7, 27, 49, .08) !important;
    background: rgba(255, 255, 255, .97) !important;
    backdrop-filter: blur(16px) !important;
  }

  body[data-scope="app"][data-auth] .site-header .header-inner {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    width: calc(100% - 28px) !important;
    height: 64px !important;
    min-height: 64px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    align-items: center !important;
    gap: 10px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-toggle {
    display: inline-flex !important;
    position: relative;
    z-index: 1103;
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth] .site-header .logo {
    display: inline-flex !important;
    width: max-content;
    min-height: 42px !important;
    margin: 0 !important;
    align-items: center;
    color: var(--workspace-navy) !important;
    font-size: 20px !important;
    line-height: 1 !important;
  }

  body[data-scope="app"][data-auth] .site-header .logo::after { display: none !important; }

  body[data-scope="app"][data-auth] .site-header .nav {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 1102;
    display: flex !important;
    width: min(86vw, 330px) !important;
    height: 100dvh;
    margin: 0 !important;
    padding: 86px 20px 26px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    overflow-y: auto !important;
    border: 0 !important;
    border-right: 1px solid var(--workspace-line) !important;
    background: #fff !important;
    box-shadow: 18px 0 54px rgba(7, 27, 49, .16) !important;
    transform: translateX(-106%) !important;
    transition: transform 220ms ease !important;
  }

  html.nav-open body[data-scope="app"][data-auth] .site-header .nav {
    transform: translateX(0) !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link {
    display: flex !important;
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 6px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf1f4 !important;
    border-radius: 0 !important;
    color: #5d7182 !important;
    background: transparent !important;
    font-size: 14px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link.active {
    color: var(--workspace-navy) !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link::after { display: none !important; }
  body[data-scope="app"][data-auth] .site-header .nav-ico { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; }
  body[data-scope="app"][data-auth] .site-header .nav-ico svg { width: 19px !important; height: 19px !important; stroke-width: 1.55; }

  body[data-scope="app"][data-auth] .site-header .header-actions {
    display: flex !important;
    width: auto !important;
    height: 42px;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center;
    justify-content: flex-end;
    gap: 2px !important;
    border: 0 !important;
  }

  body[data-scope="app"][data-auth] .site-header .notif-trigger,
  body[data-scope="app"][data-auth] .site-header .profile-trigger {
    width: 38px;
    min-width: 38px;
    height: 42px;
    min-height: 42px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth] main.page-content {
    width: 100%;
    margin-left: 0 !important;
    padding: 22px 0 48px !important;
  }


  body[data-scope="app"][data-auth] main.page-content::before { display: none; }

  body[data-scope="app"][data-auth] main.page-content > .container {
    width: calc(100% - 28px) !important;
    max-width: none !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  body[data-scope="app"][data-auth] .main-footer {
    width: 100%;
    margin-left: 0 !important;
  }

  body[data-scope="app"][data-auth] .main-footer .container {
    width: calc(100% - 28px) !important;
    max-width: none !important;
    margin-inline: auto !important;
  }

  body[data-scope="app"][data-auth] .footer-top {
    padding: 28px 0 22px !important;
  }

  body[data-scope="app"][data-auth] .footer-inner {
    grid-template-columns: 1fr;
    gap: 0 !important;
  }

  body[data-scope="app"][data-auth] .footer-brand {
    padding-bottom: 20px;
  }

  body[data-scope="app"][data-auth] .footer-acc {
    padding: 11px 0;
    border-top: 1px solid rgba(7, 27, 49, .08);
  }
}

/* Focused authenticated shell: the rail, upper service bar and compact footer
   read as one workspace without turning navigation into a framed panel. */
body[data-scope="app"][data-auth] .workspace-topbar {
  display: none;
}

body[data-scope="app"][data-auth],
body[data-scope="app"][data-auth] *,
body[data-scope="app"][data-auth] *::before,
body[data-scope="app"][data-auth] *::after {
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] .workspace-footer {
  border-top: 1px solid var(--workspace-line) !important;
  color: #6f808d !important;
  background: #eef3f6 !important;
}

body[data-scope="app"][data-auth] .workspace-footer__inner {
  display: flex;
  min-height: 68px;
  padding-block: 15px !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}

body[data-scope="app"][data-auth] .workspace-footer__brand,
body[data-scope="app"][data-auth] .workspace-footer__links {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
}

body[data-scope="app"][data-auth] .workspace-footer__bank {
  color: var(--workspace-navy);
  font-size: 12.5px;
  line-height: 1.3;
}

body[data-scope="app"][data-auth] .workspace-footer__copy,
body[data-scope="app"][data-auth] .workspace-footer__links a {
  color: #71818e !important;
  font-size: 10.5px !important;
  font-weight: 400 !important;
  line-height: 1.4;
  text-decoration: none !important;
}

body[data-scope="app"][data-auth] .workspace-footer__links a:hover {
  color: var(--workspace-navy) !important;
}

@media (min-width: 761px) {
  body[data-scope="app"][data-auth] .workspace-topbar {
    position: fixed;
    z-index: 1040;
    top: 0;
    right: 0;
    left: var(--workspace-rail);
    display: flex;
    height: 73px;
    align-items: center;
    border-bottom: 1px solid rgba(7, 27, 49, .09);
    background: rgba(243, 246, 248, .96);
    backdrop-filter: blur(14px);
    pointer-events: none;
  }

  body[data-scope="app"][data-auth] .workspace-topbar__context {
    display: flex;
    width: min(calc(100% - 64px), 1380px);
    min-width: 0;
    height: 100%;
    margin-inline: auto;
    padding-right: 112px;
    align-items: center;
    gap: 13px;
  }

  body[data-scope="app"][data-auth] .workspace-topbar__eyebrow {
    color: #7a8995;
    font-size: 9.5px;
    line-height: 1;
    letter-spacing: .11em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body[data-scope="app"][data-auth] .workspace-topbar__divider {
    width: 1px;
    height: 18px;
    background: #d6e0e6;
  }

  body[data-scope="app"][data-auth] .workspace-topbar__section {
    overflow: hidden;
    color: var(--workspace-navy);
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-scope="app"][data-auth] main.page-content::before {
    display: none !important;
  }

  body[data-scope="app"][data-auth] main.page-content > .container {
    width: min(calc(100% - 64px), 1380px) !important;
    max-width: 1380px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  body[data-scope="app"][data-auth] .site-header .header-inner {
    padding-top: 24px !important;
  }

  body[data-scope="app"][data-auth] .site-header .logo {
    min-height: 42px !important;
    margin: 0 12px 31px !important;
    font-size: 21px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav {
    gap: 2px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link {
    min-height: 44px !important;
    padding-inline: 12px !important;
    gap: 11px !important;
    font-size: 13px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link::after {
    top: 12px !important;
    bottom: 12px !important;
    left: 2px !important;
    width: 2px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav-link:hover,
  body[data-scope="app"][data-auth] .site-header .nav-link.active {
    background: transparent !important;
  }

  body[data-scope="app"][data-auth] .site-header .header-actions {
    top: 15px !important;
    height: 43px;
    gap: 1px !important;
  }

  body[data-scope="app"][data-auth] .site-header .notif-trigger,
  body[data-scope="app"][data-auth] .site-header .profile-trigger {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  body[data-scope="app"][data-auth] .workspace-footer {
    width: auto;
    margin-left: var(--workspace-rail) !important;
  }

  body[data-scope="app"][data-auth] .workspace-footer .container {
    width: min(calc(100% - 64px), 1380px) !important;
    max-width: 1380px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }
}

@media (max-width: 760px) {
  body[data-scope="app"][data-auth] .workspace-topbar {
    display: none !important;
  }

  body[data-scope="app"][data-auth] .site-header,
  body[data-scope="app"][data-auth] .site-header .header-inner {
    min-height: 60px !important;
    height: 60px !important;
  }

  body[data-scope="app"][data-auth] {
    padding-top: 60px;
  }

  body[data-scope="app"][data-auth] .site-header .header-inner {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  body[data-scope="app"][data-auth] .site-header .nav-toggle {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  body[data-scope="app"][data-auth] .site-header .logo {
    min-height: 40px !important;
    font-size: 19px !important;
  }

  body[data-scope="app"][data-auth] .site-header .nav {
    padding-top: 76px !important;
  }

  body[data-scope="app"][data-auth] .workspace-footer__inner {
    min-height: 0;
    padding-block: 16px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  body[data-scope="app"][data-auth] .workspace-footer__brand,
  body[data-scope="app"][data-auth] .workspace-footer__links {
    gap: 6px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-scope="app"][data-auth] *,
  body[data-scope="app"][data-auth] *::before,
  body[data-scope="app"][data-auth] *::after {
    transition-duration: .01ms !important;
  }
}

/* -------------------------------------------------------------------------
   Second-pass client UI hardening. These rules deliberately stay inside the
   authenticated workspace and repair legacy component geometry without
   changing any page hooks or behaviour. */

body[data-scope="app"][data-auth] .card,
body[data-scope="app"][data-auth] .loan-panel,
body[data-scope="app"][data-auth] .transfer-card,
body[data-scope="app"][data-auth] .convert-card,
body[data-scope="app"][data-auth] .review-card,
body[data-scope="app"][data-auth] .status-card,
body[data-scope="app"][data-auth] .pr3-panel,
body[data-scope="app"][data-auth] .kyc-form {
  padding: 22px !important;
}

body[data-scope="app"][data-auth] .loan-panel__body,
body[data-scope="app"][data-auth] .transfer-body {
  padding-block: 16px !important;
}

body[data-scope="app"][data-auth] .loan-ref,
body[data-scope="app"][data-auth] .loan-amount,
body[data-scope="app"][data-auth] .loan-kpi__v,
body[data-scope="app"][data-auth] .conv-metric__value {
  font-size: 13.5px !important;
  line-height: 1.35 !important;
}

@media (min-width: 761px) {
  body[data-scope="app"][data-auth] .page-subhead {
    align-items: center !important;
  }

  body[data-scope="app"][data-auth] .page-subhead .page-intro {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  body[data-scope="app"][data-auth] .page-subhead .page-actions {
    min-width: max-content;
    margin-left: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap !important;
  }

  body[data-scope="app"][data-auth] .page-subhead .page-actions .btn {
    height: 40px;
    min-height: 40px !important;
    padding-inline: 11px !important;
    white-space: nowrap;
  }

  body[data-scope="app"][data-auth] .site-header,
  body[data-scope="app"][data-auth] .site-header .header-inner,
  body[data-scope="app"][data-auth] .site-header .logo {
    visibility: visible !important;
    opacity: 1 !important;
  }

  body[data-scope="app"][data-auth] .site-header .logo {
    position: relative !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    color: var(--workspace-navy) !important;
  }
}

/* One field geometry across conversion, transfers, account opening and KYC. */
body[data-scope="app"][data-auth] .form-field > .input,
body[data-scope="app"][data-auth] .form-field > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body[data-scope="app"][data-auth] .form-field > select,
body[data-scope="app"][data-auth] .form-field > textarea,
body[data-scope="app"][data-auth] .field > .input,
body[data-scope="app"][data-auth] .field > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body[data-scope="app"][data-auth] .field > select,
body[data-scope="app"][data-auth] .field > textarea,
body[data-scope="app"][data-auth] .transfer-money-field__input {
  min-height: 44px !important;
  padding: 9px 11px !important;
  border: 1px solid #cbd6de !important;
  border-radius: 4px !important;
  color: var(--workspace-navy) !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}

body[data-scope="app"][data-auth] .transfer-money-field {
  border: 0 !important;
}

body[data-scope="app"][data-auth] select {
  appearance: auto;
  background-color: #fff !important;
}

body[data-scope="app"][data-auth] .hint,
body[data-scope="app"][data-auth] .loan-hint,
body[data-scope="app"][data-auth] .field-hint,
body[data-scope="app"][data-auth] .form-help,
body[data-scope="app"][data-auth] .file-uploader-note,
body[data-scope="app"][data-auth] .form-field > .muted,
body[data-scope="app"][data-auth] label > .hint {
  margin-top: 1px !important;
  color: #7b8b98 !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
}

/* Accounts: a usable master column, identifiers stay on one calm line and the
   amount is the only right-aligned value in a list row. */
body[data-scope="app"][data-auth][data-page="accounts"] .ac-shell {
  grid-template-columns: minmax(330px, .78fr) minmax(0, 1.22fr) !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-list,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-detail,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-items,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__main {
  min-width: 0 !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 14px !important;
  padding: 15px 10px !important;
  text-align: left !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__main {
  width: auto !important;
  max-width: none !important;
  text-align: left !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__title,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__sub,
body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__restriction {
  min-width: 0 !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  text-align: left !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__sub {
  display: block !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-overflow: ellipsis !important;
}

body[data-scope="app"][data-auth][data-page="accounts"] .ac-item__bal {
  min-width: max-content;
  text-align: right !important;
  white-space: nowrap !important;
}

/* Transaction history: restore the six desktop columns that its renderer
   emits. Mobile deliberately uses the separate .tx-mrow markup. */
body[data-scope="app"][data-auth][data-page="history"] .banking-card--full {
  padding: 26px !important;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-list,
body[data-scope="app"][data-auth][data-page="history"] .tx-list--full {
  display: block !important;
  width: 100% !important;
  min-width: 0;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-table-head,
body[data-scope="app"][data-auth][data-page="history"] .tx-row {
  display: grid !important;
  grid-template-columns: 28px 100px minmax(220px, 1fr) 92px 124px 136px !important;
  gap: 12px !important;
  width: 100%;
  min-width: 0;
  align-items: center !important;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-table-head {
  min-height: 38px;
  padding: 0 0 9px !important;
  border-bottom: 1px solid var(--workspace-line) !important;
  color: #7a8995 !important;
  font-size: 10.5px !important;
  line-height: 1.2;
  letter-spacing: .045em;
  text-transform: uppercase;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-row {
  min-height: 62px;
  padding: 11px 0 !important;
  border-bottom: 1px solid #e8edf1 !important;
  color: #294055;
  background: transparent !important;
  cursor: pointer;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-row:hover {
  color: var(--workspace-navy);
  background: #f7f9fa !important;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-cell,
body[data-scope="app"][data-auth][data-page="history"] .tx-desc {
  min-width: 0;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-desc {
  overflow: hidden;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-overflow: ellipsis;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-num {
  justify-self: stretch;
  text-align: right !important;
  white-space: nowrap;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-status,
body[data-scope="app"][data-auth][data-page="history"] .tx-head--status {
  justify-self: start;
  text-align: left !important;
  white-space: nowrap;
}

body[data-scope="app"][data-auth][data-page="history"] .tx-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  color: var(--workspace-blue);
}

/* Loan overview: two readable overview panels, followed by a full-width list.
   Loan detail stays one column so bank coordinates can never overlap. */
body[data-scope="app"][data-auth][data-page="loans"] .loan-dashboard,
body[data-scope="app"][data-auth][data-page="loans"] .loan-dashboard--v2 {
  display: block !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-top {
  display: grid !important;
  grid-template-columns: minmax(310px, .82fr) minmax(0, 1.18fr) !important;
  align-items: stretch !important;
  gap: 18px !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-top > .loan-panel {
  min-width: 0;
  height: 100%;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-kv {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-kv .row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: baseline !important;
  padding: 9px 0;
  border-bottom: 1px solid #e8edf1;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-kv .v {
  min-width: max-content;
  text-align: right;
  white-space: nowrap;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-list {
  display: block !important;
  width: 100%;
  margin-top: 18px !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__head,
body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__row {
  display: grid !important;
  grid-template-columns: minmax(178px, 1.25fr) minmax(145px, 1fr) minmax(110px, .72fr) minmax(126px, .76fr) 90px !important;
  gap: 12px !important;
  align-items: center !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-table .th,
body[data-scope="app"][data-auth][data-page="loans"] .loan-table .td {
  min-width: 0;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-ref,
body[data-scope="app"][data-auth][data-page="loans"] .loan-install__ref {
  overflow: hidden !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-overflow: ellipsis;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__head > :nth-child(4),
body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__head > :nth-child(5),
body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__row > :nth-child(4),
body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__row > :nth-child(5) {
  text-align: right !important;
  white-space: nowrap;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .btn {
  white-space: nowrap;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-detail {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-detail > .loan-panel {
  width: 100%;
  min-width: 0;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-detail .kv-table {
  display: block !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-detail .kv-row {
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: baseline;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-detail .kv-row .v {
  min-width: 0;
  text-align: left;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-detail .kv-row .v.mono {
  overflow-x: auto;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* loan_detail.ejs uses .loan-active > .loan-active-top (not .loan-detail).
   Keep both major panels full-width so servicing coordinates never compete
   with the repayment schedule for horizontal space. */
body[data-scope="app"][data-auth][data-page="loans"] .loan-active,
body[data-scope="app"][data-auth][data-page="loans"] .loan-active > .loan-active-top {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-active > .loan-active-top > .loan-panel {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-table {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-row {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) !important;
  gap: 24px !important;
  align-items: baseline !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-row > .k,
body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-row > .v {
  min-width: 0 !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-row > .v {
  overflow-wrap: break-word !important;
  word-break: normal !important;
  text-align: left !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-row > .v.mono {
  overflow: visible !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body[data-scope="app"][data-auth][data-page="loans"] .loan-pay-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 9px !important;
}

/* Calm, coherent account-type selection; independent controls, no unexplained
   central divider or pill styling. */
body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form > .field-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form .transfer-mode-btn {
  display: flex !important;
  width: 100% !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 14px 16px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 11px !important;
  border: 1px solid #d5dfe5 !important;
  border-radius: 4px !important;
  color: #32495d !important;
  background: #f7f9fa !important;
  box-shadow: none !important;
  text-align: left !important;
}

body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form .transfer-mode-btn:hover {
  border-color: #aabac5 !important;
  color: var(--workspace-navy) !important;
  background: #fff !important;
}

body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form .transfer-mode-btn.is-selected,
body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form .transfer-mode-btn[aria-pressed="true"] {
  border-color: var(--workspace-navy) !important;
  color: var(--workspace-navy) !important;
  background: #edf2f5 !important;
}

body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form .qa-btn__ico {
  display: inline-flex !important;
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--workspace-blue) !important;
  background: transparent !important;
}

/* Support chat: metadata sits above each message, the composer is a proper
   full-width work area, and message surfaces stay restrained. */
body[data-scope="app"][data-auth][data-page="support"] .page-intro strong {
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat {
  width: 100% !important;
  max-width: 980px !important;
  min-height: 520px !important;
  margin-inline: auto !important;
  overflow: hidden !important;
  border-radius: 4px !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-messages {
  display: flex !important;
  min-height: 340px !important;
  max-height: min(62vh, 620px) !important;
  padding: 24px 28px !important;
  flex: 1 1 auto;
  flex-direction: column !important;
  gap: 14px !important;
  overflow-y: auto !important;
  background: #f1f5f7 !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg {
  display: flex !important;
  width: fit-content !important;
  max-width: min(76%, 680px) !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 5px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-client {
  align-self: flex-end !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-operator {
  align-self: flex-start !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-system {
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-meta {
  display: flex !important;
  width: 100%;
  margin: 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  color: #738492 !important;
  font-size: 10.5px !important;
  font-weight: 400 !important;
  line-height: 1.3;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-who,
body[data-scope="app"][data-auth][data-page="support"] .chat .msg-time {
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-time {
  white-space: nowrap;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-body-wrap {
  min-width: 0;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-body {
  width: fit-content !important;
  max-width: 100% !important;
  padding: 11px 14px !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: #20384d !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 13px;
  line-height: 1.55 !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-client .msg-body {
  color: #132d45 !important;
  background: #dfe9ef !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat .msg-system .msg-body {
  width: 100% !important;
  padding: 0 !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-footer {
  display: block !important;
  width: 100%;
  margin: 0 !important;
  padding: 14px !important;
  border-top: 1px solid var(--workspace-line) !important;
  background: #fff !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-compose {
  display: grid !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 10px !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-compose__box {
  display: block !important;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-input {
  width: 100% !important;
  min-height: 50px !important;
  max-height: 160px !important;
  padding: 13px 14px !important;
  resize: vertical !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-compose__actions {
  display: flex !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-action,
body[data-scope="app"][data-auth][data-page="support"] .chat-send {
  display: inline-flex !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #cbd6de !important;
  border-radius: 4px !important;
  color: var(--workspace-navy) !important;
  background: #fff !important;
  box-shadow: none !important;
}

body[data-scope="app"][data-auth][data-page="support"] .chat-send {
  border-color: var(--workspace-navy) !important;
  color: #fff !important;
  background: var(--workspace-navy) !important;
}

@media (max-width: 980px) and (min-width: 761px) {
  body[data-scope="app"][data-auth][data-page="accounts"] .ac-shell {
    grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr) !important;
  }

  body[data-scope="app"][data-auth][data-page="history"] .tx-table-head,
  body[data-scope="app"][data-auth][data-page="history"] .tx-row {
    grid-template-columns: 24px 88px minmax(180px, 1fr) 80px 110px 120px !important;
    gap: 9px !important;
  }
}

@media (max-width: 860px) {
  body[data-scope="app"][data-auth][data-page="history"] .tx-table-head,
  body[data-scope="app"][data-auth][data-page="history"] .tx-row {
    display: none !important;
  }

  body[data-scope="app"][data-auth][data-page="history"] .tx-mrow {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) auto !important;
    gap: 11px !important;
    min-height: 62px;
    padding: 12px 0 !important;
    align-items: center !important;
    border-bottom: 1px solid #e8edf1 !important;
  }

  body[data-scope="app"][data-auth][data-page="history"] .tx-mleft,
  body[data-scope="app"][data-auth][data-page="history"] .tx-mright {
    min-width: 0;
  }

  body[data-scope="app"][data-auth][data-page="history"] .tx-mright {
    text-align: right;
    white-space: nowrap;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-top {
    grid-template-columns: 1fr !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__head {
    display: none !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-table--mix .loan-table__row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 10px 16px !important;
    padding: 16px 0 !important;
  }
}

@media (max-width: 760px) {
  body[data-scope="app"][data-auth] {
    font-size: 13.5px;
  }

  body[data-scope="app"][data-auth] main.page-content {
    padding: 18px 0 40px !important;
  }

  body[data-scope="app"][data-auth] .page-titlebar .ui-title,
  body[data-scope="app"][data-auth] .page-head .ui-title {
    gap: 9px;
    font-size: 25px !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
  }

  body[data-scope="app"][data-auth] .title-ico {
    width: 19px !important;
    height: 19px !important;
    flex-basis: 19px;
  }

  body[data-scope="app"][data-auth] .page-subhead {
    margin: 10px 0 20px !important;
    padding-bottom: 18px !important;
    gap: 14px !important;
  }

  body[data-scope="app"][data-auth] .page-intro {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  body[data-scope="app"][data-auth] .card,
  body[data-scope="app"][data-auth] .loan-panel,
  body[data-scope="app"][data-auth] .transfer-card,
  body[data-scope="app"][data-auth] .convert-card,
  body[data-scope="app"][data-auth] .review-card,
  body[data-scope="app"][data-auth] .status-card,
  body[data-scope="app"][data-auth] .pr3-panel,
  body[data-scope="app"][data-auth] .kyc-form {
    padding: 17px !important;
  }

  body[data-scope="app"][data-auth] .form-grid,
  body[data-scope="app"][data-auth] .grid-2,
  body[data-scope="app"][data-auth] .transfer-amount-layout,
  body[data-scope="app"][data-auth] .convert-start-fields,
  body[data-scope="app"][data-auth] .loan-start-fields {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 15px !important;
  }

  body[data-scope="app"][data-auth] .input,
  body[data-scope="app"][data-auth] input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  body[data-scope="app"][data-auth] select,
  body[data-scope="app"][data-auth] textarea {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body[data-scope="app"][data-auth] .table-wrap,
  body[data-scope="app"][data-auth] .support-table-wrap,
  body[data-scope="app"][data-auth] .loan-table,
  body[data-scope="app"][data-auth] .ac-table {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  body[data-scope="app"][data-auth] .page-subhead .page-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap !important;
  }

  body[data-scope="app"][data-auth] .page-subhead .page-actions .btn {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
  }

  body[data-scope="app"][data-auth] .page-subhead .page-actions .btn:only-child {
    flex: 0 1 auto;
  }

  body[data-scope="app"][data-auth][data-page="accounts"] .ac-shell {
    display: block !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth][data-page="accounts"] .ac-item {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  body[data-scope="app"][data-auth][data-page="open-account"] #open-account-page-form > .field-row {
    grid-template-columns: 1fr !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-detail .kv-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-pay .kv-row {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-kpi,
  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-kpis {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-kpi__item {
    display: grid !important;
    min-height: 0 !important;
    padding: 9px 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: baseline !important;
    border: 0 !important;
    border-bottom: 1px solid var(--workspace-line) !important;
    background: transparent !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-kpi__item:last-child {
    border-bottom: 0 !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-kpi__v {
    min-width: max-content;
    font-size: 12.5px !important;
    text-align: right !important;
    white-space: nowrap;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-table--repayments .loan-table__row {
    min-height: 0 !important;
    padding: 9px 0 !important;
    gap: 6px 12px !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-active .loan-table--repayments .td {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  body[data-scope="app"][data-auth][data-page="loans"] .loan-pay-actions {
    flex-wrap: wrap !important;
  }

  body[data-scope="app"][data-auth][data-page="support"] .chat {
    min-height: 0 !important;
  }

  body[data-scope="app"][data-auth][data-page="support"] .chat-messages {
    min-height: 320px !important;
    max-height: calc(100dvh - 330px) !important;
    padding: 18px 14px !important;
  }

  body[data-scope="app"][data-auth][data-page="support"] .chat .msg {
    max-width: 88% !important;
  }

  body[data-scope="app"][data-auth][data-page="support"] .chat-compose {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
}
