/* TPLOS sign-in — TrueNorth Financial brand (Dark Blue #0D2844, Ice Blue #A4C4DC, Beige #F5F3E0, greys).
   Red #B3261E only as a warning, always with words. Serif headings, Lato body (system fallback when offline). */
:root {
  --navy: #0D2844; --ice: #A4C4DC; --beige: #F5F3E0;
  --ink: #1D1D1B; --grey: #575756; --line: #C8C8C8; --white: #FFFFFF;
  --steel: #3D5F82; --ice-light: #E6EEF5; --warn: #B3261E; --ok: #1F5F3F;
  --serif: "Capitolium 2", Georgia, "Times New Roman", serif;
  --sans: Lato, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--beige); font-size: 16px; line-height: 1.5;
       min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--steel); }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; }

/* header */
.top { background: linear-gradient(135deg, #1D1D1B, #0D2844); color: var(--white); }  /* as the illustrators' site banner */
.top-in { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo { height: 44px; width: auto; display: block; }
.product { display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,.35); padding-left: 16px; }
.product-name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .5px; }
.product-sub { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ice); }
.topnav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.topnav a, .topnav button { color: var(--white); background: transparent; border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px; padding: 6px 12px; text-decoration: none; cursor: pointer; font-size: 14px; }
.topnav a:hover, .topnav button:hover, .topnav a.on { background: rgba(255,255,255,.12); border-color: var(--ice); }

/* main */
.view { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 32px 20px 48px; outline: none; }
.loading { color: var(--grey); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 3px rgba(13,40,68,.06); }
.narrow { max-width: 460px; margin: 0 auto; }
.mid { max-width: 680px; margin: 0 auto; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 22px; margin-top: 4px; }
h3 { font-size: 18px; }
.eyebrow { font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--grey); margin: 0 0 6px; }
.lead { color: var(--grey); margin: 0 0 20px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.muted { color: var(--grey); font-size: 14px; }
.small { font-size: 13px; }

/* forms */
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 700; font-size: 14px; color: var(--navy); margin: 0 0 6px; }
.field .hint { font-size: 13px; color: var(--grey); margin-top: 4px; }
input[type=email], input[type=password], input[type=text], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--ice); outline-offset: 1px; border-color: var(--steel); }
input.code { font-size: 26px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.btn { display: inline-block; border: 1px solid var(--navy); background: var(--navy); color: var(--white); border-radius: 8px;
       padding: 10px 18px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--steel); border-color: var(--steel); color: var(--white); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.secondary { background: var(--white); color: var(--navy); }
.btn.secondary:hover { background: var(--ice-light); color: var(--navy); }
.btn.danger { background: var(--white); color: var(--warn); border-color: var(--warn); }
.btn.danger:hover { background: #fbeceb; }
.btn.small { padding: 6px 10px; font-size: 13px; font-weight: 700; }
.linkbtn { background: none; border: 0; color: var(--steel); text-decoration: underline; cursor: pointer; padding: 0; }

/* messages — always words + a marker, never colour alone */
.msg { border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; border: 1px solid; font-size: 15px; }
.msg::before { font-weight: 700; margin-right: 6px; }
.msg.error { background: #fbeceb; border-color: var(--warn); color: #6e1712; }
.msg.error::before { content: "Problem:"; }
.msg.ok { background: #e8f2ec; border-color: var(--ok); color: #14402a; }
.msg.ok::before { content: "Done:"; }
.msg.info { background: var(--ice-light); border-color: var(--ice); color: var(--navy); }
.msg.info::before { content: "Note:"; }

/* two-step setup */
.qr { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 8px 0 18px; }
.qr img { width: 190px; height: 190px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.secret { font-family: ui-monospace, Consolas, monospace; background: var(--beige); padding: 6px 8px; border-radius: 6px; word-break: break-all; font-size: 14px; }
ol.steps { padding-left: 20px; margin: 0 0 16px; }
ol.steps li { margin-bottom: 6px; }

/* home */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.tile h3 { margin-bottom: 6px; }
.tile.soon { background: var(--ice-light); border-style: dashed; }
/* home: same pattern as the illustrators' home page (greeting, then white cards) */
.hello { font-size: 30px; margin: 0 0 6px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.tool { display: flex; flex-direction: column; gap: 10px; background: var(--white); border-radius: 14px; padding: 24px;
        box-shadow: 0 2px 12px rgba(0,0,0,.06); border: 2px solid transparent; color: inherit; text-decoration: none; }
a.tool:hover { border-color: var(--ice); transform: translateY(-2px); }
.tool.wide { grid-column: 1 / -1; }
.tool .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--ice-light); display: flex; align-items: center; justify-content: center; }
.tool h2 { margin: 4px 0 0; font-size: 22px; }
.tool p { margin: 0; color: var(--grey); font-size: 15px; line-height: 1.5; }
.tool .go { font-weight: 700; color: var(--grey); font-size: 14px; }
.tool.soon { opacity: .75; }
.tool-slot { grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: 14px; padding: 16px 20px; color: var(--grey); font-size: 14px; }
.home-foot { margin-top: 36px; font-size: 12px; color: var(--grey); text-align: center; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
         border: 1px solid var(--steel); color: var(--steel); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.badge.warn { border-color: var(--warn); color: var(--warn); }
.badge.ok { border-color: var(--ok); color: var(--ok); }
.badge.navy { border-color: var(--navy); background: var(--navy); color: var(--white); }

/* admin */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy); color: var(--white); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .actions { margin-top: 0; gap: 6px; }
.section { margin-top: 32px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(13,40,68,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: var(--white); border-radius: var(--radius); padding: 24px; max-width: 520px; width: 100%; max-height: 90vh; overflow: auto; }

/* footer */
.foot { background: var(--white); border-top: 1px solid var(--line); color: var(--grey); font-size: 13px; padding: 14px 20px;
        display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot > span { max-width: 1100px; }

@media (max-width: 640px) {
  .view { padding: 20px 14px 36px; }
  .card { padding: 20px; }
  .product-sub { display: none; }
  .hello { font-size: 24px; }
  .logo { height: 36px; }
  .topnav { width: 100%; margin-left: 0; }
}

/* M2.1 admin: sub-navigation, check boxes, advisors, bulk invite, history import */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 22px; border-bottom: 2px solid var(--line); }
.subnav a { padding: 9px 14px; font-weight: 700; color: var(--grey); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subnav a.on { color: var(--navy); border-bottom-color: var(--navy); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
label.check input { width: auto; }
.small-list { margin: 6px 0 0; padding-left: 18px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
textarea.paste { width: 100%; min-height: 150px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
tr.problem td { background: #FDF1F0; }
.progress { font-weight: 700; margin: 10px 0; }
.section + .card, .card + .card { margin-top: 20px; }
