/* TAG Private Lending: investor login and portal. Large type and high contrast for every reader. */

/* ---------- login ---------- */
.tpl-auth { background: var(--ink); }
.tpl-login { min-height: 100svh; display: flex; align-items: center; background: var(--ink); color: var(--white); }
.tpl-login .wrap { padding: calc(var(--head-h) + 48px) var(--gut) 80px; max-width: 680px; width: 100%; }
.tpl-mark { display: block; width: 40px; height: auto; margin-bottom: 26px; }
.tpl-login .h2 { margin: 0 0 28px; font-size: clamp(2rem, 4.6vw, 2.9rem); line-height: 1.12; }
.tpl-form label { display: block; font-size: 17px; font-weight: 600; margin-bottom: 10px; color: var(--white); }
.tpl-form input { display: block; width: 100%; height: 60px; padding: 0 18px; border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, .35); background: #fff; color: var(--ink); font: inherit; font-size: 19px; }
.tpl-form input:focus { outline: 3px solid #7ccbc5; outline-offset: 2px; border-color: #7ccbc5; }
.tpl-form .btn { margin-top: 16px; width: 100%; height: 60px; justify-content: center; font-size: 17px; white-space: normal; text-align: center; }
.tpl-form .btn[disabled] { opacity: .7; cursor: wait; }
.tpl-err { margin: 14px 0 0; padding: 12px 16px; border-radius: 6px; background: #fff1ef; color: #8a2a1c; font-size: 16px; }
.tpl-how { margin: 18px 0 0; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .78); }
.tpl-sent { padding: 26px 26px 22px; border-radius: 8px; background: rgba(124, 203, 197, .12); border: 1px solid rgba(124, 203, 197, .5); outline: none; }
.tpl-sent .h3 { margin: 0 0 10px; color: var(--white); }
.tpl-sent p { margin: 0 0 12px; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.tpl-sent a, .tpl-login .box a, .tpl-how a { color: #fff; font-weight: 600; }
.tpl-again { margin-top: 4px; font-size: 16px; font-weight: 600; color: #7ccbc5; text-decoration: underline; text-underline-offset: 3px; }
.tpl-login .box { margin-top: 40px; padding: 20px 22px; border: 1px solid rgba(255, 255, 255, .18); border-left: 3px solid #7ccbc5; border-radius: 6px; }
.tpl-login .box p { margin: 0; font-size: 16px; color: rgba(255, 255, 255, .78); line-height: 1.6; }
.tpl-login .box p + p { margin-top: 8px; }
.tpl-login .box b { color: #fff; }
.tpl-back { margin: 28px 0 0; font-size: 16px; }
.tpl-back a { color: rgba(255, 255, 255, .8); }

/* ---------- portal ---------- */
.tpl-app { background: var(--paper); font-size: 18px; }
.pwrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gut); }
.pbar { position: sticky; top: 0; z-index: 20; background: var(--ink); color: var(--white); }
.pbar-in { max-width: 1080px; margin: 0 auto; padding: 12px var(--gut); display: flex; align-items: center; gap: 16px; }
.pbar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.pbar-brand img { width: 24px; height: auto; display: block; }
.pbar-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.pbar-brand b { font-size: 16px; font-weight: 600; }
.pbar-brand small { font-size: 13px; color: rgba(255, 255, 255, .7); }
.pbar-who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; color: rgba(255, 255, 255, .8); }
.pbtn { display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 6px; background: var(--teal); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; }
.pbtn--line { height: 40px; padding: 0 14px; background: transparent; border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; font-size: 15px; }
.pbtn--line:hover { background: #fff; color: var(--ink); }
.pmain { padding: 36px 0 56px; min-height: 60vh; }
.pstate { padding: 80px 0; font-size: 20px; color: var(--muted); }
.phead { margin: 8px 0 24px; }
.plabel { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.ph1 { margin: 0 0 6px; font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; line-height: 1.15; font-stretch: 104%; }
.ph2 { margin: 0 0 16px; font-size: 1.35rem; font-weight: 600; }
.ph3 { margin: 22px 0 10px; font-size: 1.05rem; font-weight: 600; }
.pmuted { color: var(--muted); }
.psmall { font-size: 14px; color: var(--muted); }
.pkpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.pkpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.pkpi span { display: block; font-size: 15px; color: var(--muted); }
.pkpi b { display: block; margin: 6px 0 4px; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 600; font-variant-numeric: tabular-nums; }
.pkpi small { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; margin-bottom: 18px; }
.psec { margin-top: 30px; }
.ptable { overflow-x: auto; }
.ptable table { width: 100%; border-collapse: collapse; font-size: 17px; }
.ptable th { text-align: left; font-size: 14px; font-weight: 600; color: var(--muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable tr:last-child td { border-bottom: 0; }
.pnum { text-align: right; font-variant-numeric: tabular-nums; }
.ptotal td { font-weight: 600; border-top: 2px solid var(--ink); }
.plist, .pplain { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 130px 130px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 16px; }
.pplain li { margin: 6px 0; }
.pflag { margin-top: 18px; padding: 14px 18px; border-radius: 8px; background: #fff7e6; border: 1px solid #f0d49a; font-size: 15px; }
.pflag ul { margin: 6px 0 0; padding-left: 20px; }
.pnote { margin: -8px 0 18px; padding: 12px 16px; border-radius: 8px; background: var(--teal-soft); font-size: 15px; }
.padmin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 26px; padding: 14px 18px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 16px; }
.padmin select { height: 44px; margin-left: 8px; padding: 0 12px; border-radius: 6px; border: 1.5px solid var(--line); font: inherit; font-size: 16px; background: #fff; max-width: 100%; }
.ptag { padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.plink { padding: 0; font: inherit; color: var(--teal); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.pdocs { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pdoc { width: 100%; display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; font: inherit; font-size: 17px; border-top: 1px solid var(--line); }
.pdocs li:first-child .pdoc { border-top: 0; }
.pdoc:hover { background: var(--paper); }
.pdoc[aria-busy] { opacity: .6; cursor: progress; }
.pdoc-ic { width: 18px; height: 22px; border: 1.5px solid var(--muted); border-radius: 2px; position: relative; }
.pdoc-ic::after { content: ''; position: absolute; left: 3px; right: 3px; top: 6px; height: 7px; border-top: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); }
.pdoc-n { font-weight: 500; }
.pdoc .pmuted { font-size: 15px; }
.pdoc-go { font-size: 15px; font-weight: 600; color: var(--teal); }
.ptax { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.ptax > div { display: flex; flex-direction: column; gap: 4px; }
.ptax > p { grid-column: 1 / -1; margin: 0; }
.pk { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pmsg { max-width: 640px; margin: 40px 0; padding: 32px; }
.pmsg p { margin: 18px 0 0; }
.ptoast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 14px 20px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.pfoot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 15px; color: var(--muted); }
.pfoot p { margin: 0 0 8px; max-width: 80ch; }
.pfoot a { color: var(--ink); }
.pfine { font-size: 13px; }

@media (max-width: 760px) {
  .pkpis { grid-template-columns: 1fr; }
  .ptax { grid-template-columns: 1fr; }
  .pbar-who span { display: none; }
  .ptable thead { display: none; }
  .ptable table, .ptable tbody, .ptable tr, .ptable td { display: block; width: 100%; }
  .ptable tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ptable tr:last-child { border-bottom: 0; }
  .ptable td { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border: 0; text-align: right; }
  .ptable td::before { content: attr(data-k); color: var(--muted); font-size: 15px; text-align: left; }
  .ptotal td { border-top: 0; }
  .plist li { grid-template-columns: 1fr auto; }
  .plist li .pmuted { grid-column: 1 / -1; }
  .pdoc { grid-template-columns: 22px 1fr auto; }
  .pdoc .pmuted { grid-column: 2; }
  .pdoc-go { grid-row: 1; grid-column: 3; }
  .pcard { padding: 18px; }
}

/* fixes after review */
.tpl-app [hidden], .tpl-auth [hidden] { display: none !important; }
.tpl-auth .head.is-solid { background: var(--ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.tpl-auth .head.is-solid .logo img { filter: invert(1); }
@media (max-width: 760px) {
  .ptable td { display: block; position: relative; padding: 6px 0 6px 46%; text-align: right; min-height: 34px; }
  .ptable td::before { position: absolute; left: 0; top: 6px; }
  .ptable td .psmall { display: block; }
}
