/* Statements module: statement centre, staff generator and on-screen statements. Classes are prefixed stm-. */

/* Letterhead strip on on-screen statements */
.stm-letter { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); flex-wrap: wrap; }
.stm-letter img { height: 34px; width: auto; flex: none; }
.stm-letter .who { flex: 1 1 220px; font-weight: 700; font-size: 12.5px; min-width: 0; }
.stm-letter .who span, .stm-letter .ref span { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.stm-letter .ref { text-align: right; font-size: 12px; color: var(--text2); }
.stm-letter .ref b { display: block; font-size: 14px; color: var(--navy); }
.stm-letter code, .stm-small code { font-family: Consolas, 'Courier New', monospace; font-size: 11.5px; }

.stm-section { display: grid; gap: 10px; scroll-margin-top: 80px; }
.stm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stm-up { color: var(--okFg); }
.stm-small { font-size: 11.5px; margin: 8px 0 0; }
.stm-tx td.r, .stm-tx th.r { text-align: right; }
.stm-bal td { background: #eef4fa; font-weight: 700; }
.stm-tx tfoot td, .ct-tbl tfoot td { font-weight: 700; }
.stm-subtot td { background: #f5f8fb; border-top: 1px solid var(--line); }
.stm-grand td { background: #e4eef8; border-top: 2px solid var(--navy); color: var(--navy); font-weight: 700; }

/* Generator forms */
.stm-form .ct-choice { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stm-accs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; }
.stm-accs small { display: block; }
.stm-presets label, .stm-outputs label { padding: 8px 10px; align-items: center; }
.stm-presets b, .stm-outputs b { font-size: 12.5px; }
.stm-all { margin: 2px 0 8px; font-weight: 700; }
.stm-more { border: 1px solid var(--line2); border-radius: var(--radius); padding: 8px 12px; background: var(--panel2); }
.stm-more summary { cursor: pointer; font-weight: 700; color: #22517a; font-size: 12.5px; }
.stm-more[open] summary { margin-bottom: 10px; }
.stm-scope[hidden] { display: none; }
.stm-scope { border: 1px solid #c2d9f5; background: #f7fbff; border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.stm-scope h4 { margin: 0; font-size: 12.5px; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
.stm-search { position: relative; }
.stm-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 2px; background: #fff; border: 1px solid #9fb2c6; border-radius: var(--radius); box-shadow: 0 8px 22px rgba(18, 45, 72, .18); max-height: 290px; overflow: auto; }
.stm-results button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line2); background: #fff; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--text); }
.stm-results button:hover, .stm-results button:focus { background: #eef6ff; }
.stm-results small { display: block; color: var(--muted); }
.stm-results .none { padding: 10px; color: var(--muted); }
.stm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stm-chip { display: inline-flex; align-items: center; gap: 6px; background: #e4f0ff; color: #0f4c8c; border: 1px solid #b8d4f3; border-radius: 14px; padding: 3px 4px 3px 10px; font-size: 12px; font-weight: 700; max-width: 100%; }
.stm-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stm-chip button { border: 0; background: #fff; color: #0f4c8c; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; flex: none; }
.stm-picked { border: 1px solid #b8d4f3; background: #fff; border-radius: var(--radius); padding: 10px 12px; }
.stm-picked .nm { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stm-picked .accs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 14px; margin-top: 8px; }

/* Monthly e-statements grid */
.stm-months th.c, .stm-months td.c { text-align: center; }
.stm-months th .sub { font-weight: 400; }
.stm-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 3px; border: 1px solid #c9d7e5; background: #fff; color: #0a6fd2; margin: 0 1px; }
.stm-ic:hover { background: #eef6ff; border-color: #8fb3d8; }

/* Run page */
.stm-progress { height: 10px; border-radius: 6px; background: #e3eaf1; overflow: hidden; }
.stm-progress span { display: block; height: 100%; background: linear-gradient(90deg, #1688eb, #0a9160); transition: width .4s; }
.stm-downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.stm-downloads a { display: flex; gap: 10px; align-items: center; border: 1px solid #dde5ed; border-radius: 4px; padding: 10px 12px; background: var(--panel2); color: var(--text); font-weight: 700; font-size: 12.5px; }
.stm-downloads a:hover { border-color: #8fb3d8; background: #eef6ff; }
.stm-downloads a i { font-size: 20px; color: #0a6fd2; width: 34px; height: 34px; border-radius: 50%; background: #e4f0ff; display: grid; place-items: center; flex: none; }
.stm-downloads a small { display: block; font-weight: 400; color: var(--muted); }

@media (max-width: 640px) {
    .stm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stm-letter .ref { text-align: left; flex: 1 1 100%; }
    .stm-form .ct-choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stm-accs { grid-template-columns: 1fr !important; }
}
@media print {
    .stm-letter { box-shadow: none; }
    .stm-more, .stm-form { display: none; }
}

/* ===================================================================== statement centre v2 */
.stm-tabs { flex-wrap: wrap; }
.stm-tabs a i { margin-right: 4px; }

/* The document on screen: a sheet of paper carrying the same body as the PDF. */
.stm-paper { position: relative; background: #fff; border: 1px solid #d7dfe8; border-top: 4px solid #061a36; border-radius: 3px; box-shadow: 0 10px 30px rgba(6, 26, 54, .10), 0 2px 6px rgba(6, 26, 54, .06); padding: 26px 34px 22px; overflow: hidden; }
.stm-paper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, #b8924a, #e3c98f 50%, #b8924a); }
.stm-paper-micro { font-size: 4px; line-height: 5px; color: #9fb4c8; white-space: nowrap; overflow: hidden; letter-spacing: .4px; margin: -8px 0 10px; user-select: none; }
.stm-paper .pd { font-size: 13.2px; }
.stm-paper .pd-head .logo img { height: 52px; }
.stm-paper .pd-tx thead th { position: sticky; top: 0; z-index: 1; }
.stm-paper .pd-tx tbody tr:not(.month):not(.open):not(.close):not(.tot):hover td { background: #eef6fd; }
.stm-paper .pd-tx a { color: #0a4f94; text-decoration: none; border-bottom: 1px dotted #9cc3e8; }
.stm-paper .pd-tx a:hover { color: #0068d9; border-bottom-style: solid; }
.stm-paper .pd-verify .qr svg { width: 92px; height: 92px; }
.stm-paper .stm-trend .stm-hit { cursor: crosshair; }
.stm-paper .stm-trend .stm-hit:hover { fill: #b8924a; }
.stm-paper .pd-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stm-paper .pd-hero { border-radius: 2px; }
.stm-paper-foot { margin-top: 18px; padding-top: 8px; border-top: 1px solid #b8924a; font-size: .74em; color: #5f6f80; line-height: 1.5; }
.stm-paper-foot b { color: #061a36; }

/* Filter toolbar above an on-screen statement */
.stm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; box-shadow: var(--shadow); }
.stm-toolbar select, .stm-toolbar input { height: 34px; border: 1px solid #b9c7d6; border-radius: 3px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; min-width: 0; }
.stm-tb-search { position: relative; flex: 1 1 220px; min-width: 0; }
.stm-tb-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #6b7a8a; }
.stm-tb-search input { width: 100%; padding-left: 30px; }
.stm-issued a { font-weight: 700; }

/* Letters page intro */
.stm-intro { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; background: linear-gradient(120deg, #061a36 0%, #0b2a4f 62%, #123d6b 100%); color: #fff; border-radius: 4px; padding: 22px 24px; position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(6, 26, 54, .18); }
.stm-intro::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(184, 146, 74, .35); box-shadow: 0 0 0 18px rgba(31, 169, 223, .05), 0 0 0 36px rgba(31, 169, 223, .04); }
.stm-intro .txt { flex: 1 1 380px; min-width: 0; position: relative; z-index: 1; }
.stm-intro .kick { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #e3c98f; font-weight: 700; }
.stm-intro h2 { font-family: var(--fd); font-weight: 400; font-size: 26px; margin: 6px 0 8px; color: #fff; line-height: 1.2; }
.stm-intro p { margin: 0; color: #c9d6e6; max-width: 640px; line-height: 1.55; }
.stm-intro .stat { flex: 0 0 auto; position: relative; z-index: 1; border-left: 1px solid rgba(255, 255, 255, .18); padding-left: 20px; display: flex; flex-direction: column; justify-content: center; min-width: 170px; }
.stm-intro .stat b { font-family: var(--fd); font-size: 38px; font-weight: 400; line-height: 1; }
.stm-intro .stat span { color: #c9d6e6; font-size: 12.5px; margin: 4px 0 10px; }
.stm-intro .stat a { color: #7fd0f2; font-weight: 700; font-size: 12.5px; }

/* Document cards */
.stm-dcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.stm-dc { background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; position: relative; transition: border-color .15s, box-shadow .15s; }
.stm-dc:hover { border-color: #9fbbd6; box-shadow: 0 6px 18px rgba(6, 26, 54, .10); }
.stm-dc::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; border-radius: 4px 4px 0 0; background: linear-gradient(90deg, #061a36, #0b2a4f 60%, #b8924a); }
.stm-dc header { display: flex; gap: 12px; align-items: flex-start; }
.stm-dc header h4 { margin: 0 0 3px; font-size: 15px; color: var(--navy); font-family: var(--fd); font-weight: 400; }
.stm-dc header p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.stm-dc .ic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #061a36; color: #e3c98f; display: grid; place-items: center; font-size: 18px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #b8924a; margin: 2px 2px 0; }
.stm-dc form { display: grid; gap: 8px; margin: 0; }
.stm-dc .ct-field { margin: 0; }
.stm-dc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.stm-dc-points { margin: 0; padding-left: 18px; color: var(--text2); font-size: 12.5px; line-height: 1.7; }
.stm-dc.feature { background: linear-gradient(180deg, #fbfaf6, #fff 60%); }
.stm-dc.off { opacity: .78; }
.stm-dc.off .ic { background: #8a97a5; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c8d3de; color: #fff; }
.stm-dc-none { margin: 0; color: var(--muted); font-size: 12.5px; background: var(--panel2); border-radius: 3px; padding: 8px 10px; }

.stm-docic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #061a36; color: #e3c98f; font-size: 12px; margin-right: 8px; vertical-align: middle; }
.stm-inline-filter select { height: 30px; border: 1px solid #b9c7d6; border-radius: 3px; font: inherit; font-size: 12.5px; padding: 0 6px; }
.stm-inline { display: inline; margin: 0; }
.stm-filters-inline { flex-wrap: wrap; gap: 6px; }
.stm-results a.stm-result { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line2); color: var(--text); }
.stm-results a.stm-result:hover { background: #eef6ff; }
.stm-results a.stm-result small { display: block; color: var(--muted); }
.stm-typebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stm-typebar a { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 4px 10px; font-size: 12.5px; color: var(--text2); }
.stm-typebar a b { color: var(--navy); }
.stm-typebar a.on, .stm-typebar a:hover { border-color: #0b2a4f; background: #061a36; color: #fff; }
.stm-typebar a.on b, .stm-typebar a:hover b { color: #e3c98f; }
.stm-hash { margin-top: 12px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 3px; padding: 8px 10px; }
.stm-hash span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stm-hash code { font-size: 12px; word-break: break-all; color: var(--navy); }
.stm-qrbox { width: 170px; margin: 0 auto; padding: 8px; border: 1px solid var(--line2); border-radius: 4px; background: #fff; }
.stm-qrbox svg { display: block; width: 100%; height: auto; }

/* ===================================================================== public verification page */
.stv { background: radial-gradient(1200px 400px at 50% -120px, #e3eef8 0%, transparent 70%), #f5f7fa; padding: 40px 16px 56px; }
.stv-wrap { max-width: 760px; margin: 0 auto; }
.stv-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.stv-seal { width: 92px; height: 92px; flex: none; }
.stv-kick { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #a07b35; font-weight: 700; }
.stv-head h1 { font-family: var(--fd); font-weight: 400; color: #061a36; font-size: 28px; margin: 4px 0 6px; line-height: 1.2; }
.stv-head p { margin: 0; color: var(--text2); }
.stv-search { display: flex; gap: 8px; margin: 14px 0; }
.stv-search input { flex: 1 1 auto; min-width: 0; height: 46px; border: 1px solid #9fb2c6; border-radius: 4px; padding: 0 14px; font: 600 17px/1 Consolas, 'Courier New', monospace; letter-spacing: .06em; color: #061a36; background: #fff; text-transform: uppercase; }
.stv-search input:focus { outline: 2px solid #1fa9df; outline-offset: 1px; }
.stv-search button { flex: none; height: 46px; border: 0; border-radius: 4px; padding: 0 18px; background: #061a36; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.stv-search button:hover { background: #0b2a4f; }
.stv-result { background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(6, 26, 54, .08); overflow: hidden; margin-top: 8px; }
.stv-status { display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.stv-status i { font-size: 34px; flex: none; }
.stv-status b { display: block; font-size: 19px; font-family: var(--fd); font-weight: 400; }
.stv-status span { display: block; font-size: 13.5px; margin-top: 2px; }
.stv-result.ok .stv-status { background: linear-gradient(90deg, #e1f6ec, #f3fbf7); color: #0b5a3c; border-bottom: 1px solid #bfe6d2; }
.stv-result.bad .stv-status { background: linear-gradient(90deg, #fbe2e6, #fdf3f5); color: #7d1c2e; border-bottom: 1px solid #f0c3cc; }
.stv-result > p { padding: 14px 20px; margin: 0; color: var(--text2); line-height: 1.55; }
.stv-dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 6px 20px 4px; gap: 0 24px; }
.stv-dl div { padding: 10px 0; border-bottom: 1px solid var(--line2); min-width: 0; }
.stv-dl div.wide { grid-column: 1 / -1; border-bottom: 0; }
.stv-dl dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stv-dl dd { margin: 3px 0 0; color: #061a36; font-weight: 600; overflow-wrap: anywhere; }
.stv-dl .mono, .stv-hash { font-family: Consolas, 'Courier New', monospace; }
.stv-hash { font-size: 12px; font-weight: 400 !important; color: var(--text2) !important; }
.stv-small { font-size: 12.5px !important; color: var(--muted) !important; background: var(--panel2); border-top: 1px solid var(--line2); }
.stv-check { margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 20px; }
.stv-check h2 { margin: 0 0 6px; font-size: 17px; color: #061a36; font-family: var(--fd); font-weight: 400; }
.stv-check p { margin: 0; color: var(--text2); font-size: 13.5px; line-height: 1.5; }
.stv-check .stv-search input { font-size: 16px; text-transform: none; }
.stv-msg { border-radius: 4px; padding: 10px 12px; font-size: 13.5px; margin-top: 10px; }
.stv-msg.ok { background: #e1f6ec; color: #0b5a3c; }
.stv-msg.bad { background: #fbe2e6; color: #7d1c2e; }
.stv-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.stv-how div { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.stv-how i { font-size: 24px; color: #b8924a; }
.stv-how b { display: block; margin: 8px 0 4px; color: #061a36; }
.stv-how span { color: var(--text2); font-size: 13px; line-height: 1.5; }
.stv-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; }

@media (max-width: 760px) {
    .stm-paper { padding: 16px 14px 14px; }
    .stm-paper .pd { font-size: 12.4px; }
    .stm-paper .pd-head td, .stm-paper .pd-cols > tbody > tr > td, .stm-paper .pd-cols > tr > td { display: block; width: auto !important; padding-left: 0 !important; padding-right: 0 !important; text-align: left; }
    .stm-paper .pd-cols > tbody > tr > td + td { margin-top: 12px; }
    .stm-paper .pd-head .r { text-align: left; margin-top: 10px; }
    .stm-paper .pd-hero > tbody > tr > td, .stm-paper .pd-hero > tr > td { display: block; width: auto !important; border-right: 0 !important; }
    .stm-paper .pd-hero .grid td { display: inline-block; width: 50% !important; border-left: 0 !important; border-top: 1px solid #24406a; box-sizing: border-box; }
    .stm-paper .pd-hero .big { font-size: 2em; }
    .stm-paper .pd-figs td { display: inline-block; width: 50% !important; box-sizing: border-box; border-left: 0; }
    .stm-paper .pd-verify td { display: block; width: auto !important; text-align: left; }
    .stm-paper .pd-verify .seal { display: none; }
    .stm-paper .pd-sect td { display: block; width: auto !important; text-align: left; padding: .5em .8em; }
    .stm-paper .pd-tx { min-width: 560px; }
    .stm-paper .pd-bars td.lbl { width: 46%; }
    .stm-paper .pd-card .dl td, .stm-paper .pd-receipt .dl td { display: block; width: auto !important; }
    .stm-paper .pd-card .dl td.k, .stm-paper .pd-receipt .dl td.k { padding-bottom: 0; border-bottom: 0; }
    .stm-paper .pd-frame-in { padding: 14px 10px; }
    .stm-paper .pd-cert-title { font-size: 1.7em; }
    .stm-paper .pd-h .aside { float: none; display: block; padding-top: 2px; }
    .stm-paper .pd-hero-foot span[style] { float: none !important; display: block; }
    .stm-dcs { grid-template-columns: 1fr; }
    .stm-intro .stat { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 12px; }
    .stm-intro h2 { font-size: 21px; }
    .stv-head { align-items: flex-start; }
    .stv-seal { width: 64px; height: 64px; }
    .stv-head h1 { font-size: 22px; }
    .stv-dl { grid-template-columns: 1fr; }
    .stv-how { grid-template-columns: 1fr; }
    .stv-search { flex-wrap: wrap; }
    .stv-search button { width: 100%; }
}
@media print {
    .stm-toolbar, .stm-tabs, .stm-issued { display: none; }
    .stm-paper { box-shadow: none; border: 0; padding: 0; }
}
