/*
 * Copyright © 2026 Spinium Property Management OÜ - All rights reserved.
 * Author: Timo J. Rinne <tri@iki.fi>
 *
 * Unreleased and unlicensed. Any use is explicitly prohibited without a prior
 * written license from Spinium Property Management OÜ (https://spinium.com).
 * See COPYING.
 */

/* spartan-legacy — a bank whose web bank went up in about 2002 and has been
 * maintained, never replaced.
 *
 * Character: a fixed-width table frame, square corners whatever the bank's
 * radius token says, hairline borders everywhere, small dense text, underlined
 * links, and buttons that look like the browser's own. It uses the bank's
 * colours but sparingly — the era did.
 *
 * The layout being a <table> is the joke and the point: it is genuinely a
 * different page structure, not the same page with different padding. */

* { box-sizing: border-box; }

body {
	margin: 0; padding: 12px;
	/* The flat grey behind the frame is the era, not the bank. */
	background: #d8d8d8;
	color: var(--bank-on-surface);
	font-family: var(--bank-font);
	font-size: 13px;
	line-height: 1.45;
}

.frame {
	width: 100%; max-width: 840px; margin: 0 auto;
	border-collapse: collapse;
	/* The page behind the frame stays the era's flat grey — that is structure,
	   not identity — but the frame itself is the bank's own surface. */
	background: var(--bank-surface);
	border: 2px solid var(--bank-primary);
}
.frame > tbody > tr > td { padding: 0; }

.masthead { background: var(--bank-primary); color: var(--bank-on-primary); padding: 6px 8px; }
.masthead table { width: 100%; border-collapse: collapse; }
.masthead td { padding: 2px 6px; vertical-align: middle; }
.mast-mark { width: 40px; line-height: 0; }
.mast-mark svg, .mast-mark .bank-logo { display: block; }
.bank-logo { height: 36px; width: auto; max-width: 200px; }
.mast-name { font-family: var(--bank-font-heading); font-size: 18px; font-weight: bold; }
.mast-sub { font-size: 10px; font-weight: normal; text-transform: uppercase; letter-spacing: .1em; }
.mast-lang { text-align: right; white-space: nowrap; }

.langswitch { font-size: 11px; }
.langswitch .label { display: none; }
.langswitch select { font-family: inherit; font-size: 11px; }
.langswitch button { font-family: inherit; font-size: 11px; margin-left: 4px; }

.body { padding: 10px 12px 16px 12px; }
.page-main, .page-side { display: block; }
.page-side { margin-top: 14px; border-top: 2px solid var(--bank-primary); padding-top: 10px; }

h1 { font-family: var(--bank-font-heading); font-size: 17px; margin: 0 0 6px 0;
	 border-bottom: 1px solid #999; padding-bottom: 3px; }
h2 { font-family: var(--bank-font-heading); font-size: 14px; margin: 14px 0 5px 0; }
.lede { margin: 0 0 10px 0; }
a { color: var(--bank-primary); }
a:visited { color: var(--bank-accent); }

label { display: block; font-size: 12px; margin: 0 0 2px 0; }
input[type="text"], input[type="password"], input[type="date"], select {
	font: inherit; font-size: 13px; padding: 3px 4px;
	border: 1px solid #808080; border-radius: 0;
	background: #fff; color: #000; margin-bottom: 8px; width: 100%; max-width: 320px;
}
button, .button {
	font: inherit; font-size: 13px; padding: 3px 12px; cursor: pointer;
	background: #ececec; color: #000;
	border: 1px solid #808080; border-radius: 0;
	text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: #dcdcdc; }
.button-quiet { background: #fff; }
.buttonrow { display: block; }
.buttonrow button, .buttonrow .button { margin-right: 6px; }

.form-error { color: var(--bank-danger); font-weight: bold; margin: 0 0 8px 0; }
.fieldhint { font-size: 11px; color: var(--bank-muted); margin: -6px 0 8px 0; }
.reggrid { display: block; }

table.data, .tablewrap table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tablewrap { overflow-x: auto; }
th { background: #ececec; text-align: left; font-weight: bold;
	 border: 1px solid #b0b0b0; padding: 3px 5px; }
td { border: 1px solid #d0d0d0; padding: 3px 5px; vertical-align: top;
	 color: var(--bank-on-surface); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.product { border: 1px solid #b0b0b0; padding: 6px 8px; margin-bottom: 6px; }
.product-name { font-weight: bold; }
.product-type { font-size: 11px; color: var(--bank-muted); }
.product-type::before { content: "["; }
.product-type::after { content: "]"; }
.product-desc { margin: 2px 0; }
.product-terms { margin: 3px 0 0 16px; padding: 0; font-size: 12px; }
.product-cta { margin-top: 5px; }
.product-note { font-size: 11px; color: var(--bank-muted); margin: 3px 0 0 0; }
.products-none, .muted { color: var(--bank-muted); }

.acct-list { list-style: none; margin: 0; padding: 0; }
.acct-card { display: block; text-decoration: none; color: inherit;
			 border: 1px solid #b0b0b0; padding: 5px 7px; margin-bottom: 4px; }
.acct-card:hover { background: #f0f0f0; }
.acct-card-name { font-weight: bold; }
.acct-card-num { font-family: monospace; font-size: 12px; color: var(--bank-muted); }
.acct-card-bal { font-weight: bold; font-variant-numeric: tabular-nums; }
.acct-card-extra { font-size: 11px; color: var(--bank-muted); }
.acct-card-late { font-size: 12px; color: var(--bank-danger); margin-top: 2px; }

.bal-row { border-bottom: 1px dotted #b0b0b0; padding: 4px 0; }
.bal-amount { font-weight: bold; font-variant-numeric: tabular-nums; }
.bal-meta, .bal-primary { font-size: 11px; color: var(--bank-muted); }

.panel { border: 1px solid #b0b0b0; padding: 7px 9px; margin-bottom: 8px; }
dl { margin: 0; font-size: 12px; }
dt { font-weight: bold; margin-top: 5px; }
dt:first-child { margin-top: 0; }
dd { margin: 0 0 0 12px; }

.acct-head { display: block; }
.acct-actions { margin: 4px 0 8px 0; }

.foot { border-top: 2px solid var(--bank-primary); padding: 6px 12px 8px 12px;
		font-size: 11px; color: var(--bank-muted); text-align: center; }
.bank-hero { display: block; width: 100%; height: auto; max-height: 180px;
			 object-fit: cover; border: 1px solid #b0b0b0; margin-bottom: 10px; }

.notice-line {
	background: color-mix(in srgb, var(--bank-accent) 12%, #fff);
	border-left: 3px solid var(--bank-accent);
	padding: 10px 14px; margin: 0 0 14px 0; font-size: 14px;
}
.bal-form { border-bottom: 1px solid var(--bank-line); padding-bottom: 14px; margin-bottom: 14px; }
.bal-form h3 { font-size: 15px; margin: 0 0 10px 0; font-family: var(--bank-font-heading); }
.inline-fields { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.inline-fields input { width: 6em; margin: 0; }
.inline-fields select { width: auto; margin: 0; }
.nowrap { white-space: nowrap; }

.actions { margin-top: 18px; }
.cardbox, .loanbox { margin-top: 18px; }
.cardbox h3, .loanbox h3 { margin-bottom: 6px; }
.waiting { margin-top: 18px; }

/* -- scheduled instruments, beneficiaries and statements (§14) ----------- */

.instr-list { list-style: none; margin: 0 0 18px 0; padding: 0; }
.instr {
	border: 1px solid var(--bank-line); border-radius: var(--bank-radius);
	padding: 12px 14px; margin-bottom: 10px;
}
.instr-head { font-size: 15px; }
.instr-what { margin-top: 2px; }
.instr-meta { font-size: 13px; color: var(--bank-muted); margin-top: 2px; }
.instr-status {
	display: inline-block; font-size: 12px; padding: 1px 7px;
	border-radius: 999px; border: 1px solid var(--bank-line);
	vertical-align: 2px;
}
.instr-active { border-color: var(--bank-primary); color: var(--bank-primary); }
.instr-failed { border-color: var(--bank-danger); color: var(--bank-danger); }
.instr-cancelled, .instr-completed { opacity: .65; }
.instr .buttonrow { margin-top: 8px; }
.instr form { display: inline; margin: 0; }

/* A form nobody has asked for yet stays folded away, so the page opens as a
   list of what exists rather than as a wall of empty fields. */
.newform { margin-bottom: 18px; }
.newform > summary {
	cursor: pointer; font-weight: 600; padding: 8px 0;
	color: var(--bank-primary);
}
.newform[open] > summary { margin-bottom: 8px; }

.inlineform {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
	margin-bottom: 18px;
}
.inlineform label { margin: 0; align-self: center; }
.inlineform input, .inlineform select, .inlineform button { margin: 0; width: auto; }

.instr { border: 1px solid var(--bank-line); border-radius: 0; padding: 8px 10px; }
.instr-status { border-radius: 0; font-size: 11px; }
.newform > summary { font-weight: bold; text-decoration: underline; }

/* Choosing whose money you are about to move (§29.5). */
.role-list { list-style: none; margin: 0 0 8px 0; padding: 0; }
.role-item { border: 1px solid #b0b0b0; padding: 5px 7px; margin-bottom: 4px; }
.role-item-current { border-left: 3px solid var(--bank-primary); }
.role-item label { display: block; cursor: pointer; }
.role-body { display: inline; }
.role-kind { font-size: 11px; color: var(--bank-muted); text-transform: uppercase; }
.role-name { font-weight: bold; }
.role-meta { font-size: 11px; color: var(--bank-muted); }

/* Confirmation of Payee (§30.2). Bank tokens only, and the verdict is in the
   words: colour alone is not a message every payer receives. */
.cop { border: 1px solid #b0b0b0; padding: 6px 8px; margin: 0 0 8px 0; }
.cop-close-match { border-left: 3px solid var(--bank-accent); }
.cop-no-match { border-left: 3px solid var(--bank-danger); }
.cop-headline { font-weight: bold; margin: 0 0 4px 0; }
.cop-line { margin: 1px 0; color: var(--bank-muted); }
.cop-warn { font-size: 11px; margin: 0 0 8px 0; }
