/*
 * 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.
 */

/* modern-cards — a bank that redesigned three years ago and is pleased about it.
 *
 * Character: one centred column, everything in a raised card with generous
 * padding, a soft page background, big rounded corners regardless of what the
 * bank's radius token says at the small end, and a top bar rather than a
 * masthead. Where classic-portal puts facts in a side rail, this stacks them.
 *
 * Every colour and face still comes from the bank's own --bank-* tokens: the
 * skin decides the shape, the bank decides the look. */

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	background: color-mix(in srgb, var(--bank-primary) 7%, var(--bank-surface));
	color: var(--bank-on-surface);
	font-family: var(--bank-font);
	font-size: 16px;
	line-height: 1.6;
}

.shell { max-width: 760px; margin: 0 auto; padding: 0 16px 60px 16px; }

h1, h2, h3, .brand-name {
	font-family: var(--bank-font-heading); font-weight: 700; line-height: 1.25;
	letter-spacing: -0.02em;
}
a { color: var(--bank-primary); }
a:hover { color: var(--bank-accent); }

/* -- top bar ------------------------------------------------------------- */

.topbar {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; flex-wrap: wrap;
	padding: calc(20px * var(--bank-density)) 4px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark { line-height: 0; }
.brand-mark svg, .brand-mark .bank-logo { border-radius: 12px; display: block; }
.bank-logo { height: 40px; width: auto; max-width: 220px; }
.brand-name { font-size: 20px; }

.langswitch { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.langswitch .label { color: var(--bank-muted); }
.langswitch select {
	font: inherit; color: var(--bank-on-surface); background: var(--bank-surface);
	border: 1px solid var(--bank-line); border-radius: 999px; padding: 4px 10px;
}
.langswitch button { font: inherit; margin-left: 6px; border-radius: 999px; }

/* -- the canvas: everything is a card ------------------------------------ */

.canvas { display: flex; flex-direction: column; gap: 18px; }
.page-main, .page-side { display: contents; }

.page-main > *, .page-side > *, .canvas > section {
	background: #fff;
	border: 0;
	border-radius: 18px;
	padding: calc(26px * var(--bank-density));
	box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
}
.page-main > p:not(.lede), .page-main > h1 { box-shadow: none; background: none; padding: 0; }
.page-main > h1 { padding: 4px 4px 0 4px; }
.page-main > p.lede { box-shadow: none; background: none; padding: 0 4px; }

h1 { font-size: 30px; margin: 0 0 8px 0; }
h2 { font-size: 18px; margin: 0 0 14px 0; }
.lede { font-size: 17px; color: var(--bank-muted); margin: 0 0 18px 0; }

/* -- forms and buttons --------------------------------------------------- */

label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px 0; }
input[type="text"], input[type="password"], input[type="date"], select {
	width: 100%; padding: 13px 15px; font: inherit; font-size: 16px;
	border: 2px solid color-mix(in srgb, var(--bank-line) 70%, transparent);
	border-radius: 12px; margin-bottom: 16px;
	background: color-mix(in srgb, var(--bank-surface) 60%, #fff); color: inherit;
}
input:focus, select:focus {
	outline: none; border-color: var(--bank-primary);
	background: #fff;
}
button, .button {
	display: inline-block; padding: 13px 24px; font: inherit; font-size: 16px;
	font-weight: 700; cursor: pointer; text-decoration: none;
	background: var(--bank-primary); color: var(--bank-on-primary);
	border: 0; border-radius: 999px;
}
button:hover, .button:hover { background: var(--bank-accent); }
.button-quiet {
	background: transparent; color: var(--bank-primary);
	box-shadow: inset 0 0 0 2px currentColor;
}
.button-quiet:hover { background: var(--bank-primary); color: var(--bank-on-primary); box-shadow: none; }
.buttonrow { display: flex; gap: 10px; flex-wrap: wrap; }

.form-error {
	color: var(--bank-danger); font-size: 14px; font-weight: 600;
	margin: -8px 0 14px 0;
}
.fieldhint { font-size: 13px; color: var(--bank-muted); margin: -10px 0 16px 0; }
.reggrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }

/* -- products, accounts, movements --------------------------------------- */

.product { padding: 16px 0; border-bottom: 1px solid var(--bank-line); }
.product:last-child { border-bottom: 0; }
.product-name { font-family: var(--bank-font-heading); font-size: 18px; font-weight: 700; }
.product-type {
	display: inline-block; margin-left: 10px; font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .08em; vertical-align: 2px;
	background: color-mix(in srgb, var(--bank-accent) 15%, #fff);
	color: var(--bank-accent); border-radius: 999px; padding: 3px 10px;
	font-family: var(--bank-font);
}
.product-desc { color: var(--bank-muted); margin: 6px 0 0 0; }
.product-terms { margin: 10px 0 0 0; padding: 0; list-style: none; font-size: 14px; }
.product-terms li { color: var(--bank-muted); }
.product-terms li::before { content: "✓ "; color: var(--bank-accent); font-weight: 700; }
.product-cta { margin-top: 12px; }
.product-note { font-size: 12px; color: var(--bank-muted); margin: 8px 0 0 0; }
.products-none, .muted { color: var(--bank-muted); }

/* An account is a card in its own right, not a table row. */
.acct-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.acct-card {
	display: block; text-decoration: none; color: inherit;
	border: 2px solid var(--bank-line); border-radius: 16px;
	padding: 18px 20px;
}
.acct-card:hover { border-color: var(--bank-primary); }
.acct-card-name { font-family: var(--bank-font-heading); font-weight: 700; font-size: 17px; }
.acct-card-num { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--bank-muted); }
.acct-card-bal { font-size: 26px; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; }
.acct-card-extra { font-size: 14px; color: var(--bank-muted); }
.acct-card-late { font-size: 12px; color: var(--bank-danger); margin-top: 2px; }

.bal-row {
	display: flex; justify-content: space-between; align-items: baseline;
	gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--bank-line);
}
.bal-row:last-child { border-bottom: 0; }
.bal-amount { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.bal-meta { font-size: 13px; color: var(--bank-muted); }
.bal-primary {
	font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
	color: var(--bank-accent); font-weight: 700;
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
	 color: var(--bank-muted); padding: 0 0 10px 0; font-weight: 700; }
td { padding: 12px 0; border-top: 1px solid var(--bank-line); vertical-align: top; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }

.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

dl { margin: 0; }
dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
	 color: var(--bank-muted); margin-top: 12px; font-weight: 700; }
dt:first-child { margin-top: 0; }
dd { margin: 3px 0 0 0; font-size: 16px; }

.foot { text-align: center; color: var(--bank-muted); font-size: 13px; padding: 30px 0 0 0; }
.foot p { margin: 0 0 4px 0; }
.bank-hero { display: block; width: 100%; height: auto; max-height: 240px;
			 object-fit: cover; border-radius: 14px; margin-bottom: 18px; }

.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; }

/* Choosing whose money you are about to move (§29.5). A card each, like the
   accounts, because the decision is the same weight as picking one. */
.role-list { list-style: none; margin: 0 0 18px 0; padding: 0; display: grid; gap: 12px; }
.role-item { border: 2px solid var(--bank-line); border-radius: 16px; }
.role-item:hover { border-color: var(--bank-primary); }
.role-item-current { border-color: var(--bank-accent); }
.role-item label { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; cursor: pointer; }
.role-body { display: flex; flex-direction: column; gap: 3px; }
.role-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--bank-muted); }
.role-name { font-family: var(--bank-font-heading); font-weight: 700; font-size: 17px; }
.role-meta { font-size: 13px; color: var(--bank-muted); }

/* Confirmation of Payee (§30.2). The bank's own accent for a close match and
   its own danger colour for none — a skin that picked its own would be taking
   a decision that belongs to the bank. The verdict is in the words either way:
   colour alone is not a message every payer receives. */
.cop { border: 2px solid var(--bank-line); border-radius: 16px; padding: 18px 20px; margin: 0 0 16px 0; }
.cop-close-match { border-color: var(--bank-accent); }
.cop-no-match { border-color: var(--bank-danger); }
.cop-headline { font-family: var(--bank-font-heading); font-weight: 700; font-size: 17px; margin: 0 0 8px 0; }
.cop-line { margin: 2px 0; color: var(--bank-muted); }
.cop-warn { font-size: 14px; margin: 0 0 16px 0; }
