@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700&display=swap");

/* Kirjautumis- ja käyttäjähallintasivujen ulkoasu (Industry-teema).
   Omavarainen tiedosto: näitä sivuja pääsee katsomaan ilman istuntoa,
   joten ne eivät nojaa muuhun sivuston tyylitykseen. */

:root {
	--mg-bg: #f2f2f3;
	--mg-surface: #ffffff;
	--mg-surface-soft: #e9e9ea;
	--mg-panel: #1c2c3a;
	--mg-accent: #5980a6;
	--mg-accent-strong: #3f6488;
	--mg-accent-deep: #24405b;
	--mg-accent-soft: #e4ebf2;
	--mg-text: #1d1f20;
	--mg-muted: #6a6f73;
	--mg-border: #c9ccce;
	--mg-border-soft: #e0e2e3;
	--mg-danger: #a33a2f;
	--mg-ok: #3d6b4a;
	--mg-focus: rgba(89, 128, 166, 0.35);
	--mg-heading: "Barlow Condensed", "Montserrat", Arial, sans-serif;
	--mg-body: "Barlow", "Oxygen", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	min-height: 100vh;
	padding: 24px;
	background: var(--mg-bg);
	color: var(--mg-text);
	font-family: var(--mg-body);
	font-size: 14px;
	line-height: 1.5;
}

/* Yhden kortin sivut (kirjautuminen, salasanan vaihto) keskitetään. */
body.keskitetty {
	display: flex;
	align-items: center;
	justify-content: center;
}

a { color: var(--mg-accent-deep); text-decoration: none; }
a:hover { color: var(--mg-accent-strong); text-decoration: underline; }

:focus-visible { outline: 2px solid var(--mg-accent); outline-offset: 2px; }

/* ---------- Kortti ---------- */

.kortti {
	position: relative;
	width: 100%;
	max-width: 380px;
	padding: 30px 28px;
	background: var(--mg-surface);
	border: 1px solid var(--mg-border);
	border-radius: 0;
}

/* Blueprint-kulmamerkit: teeman tunnusomainen yksityiskohta. */
.kortti > .kulma {
	position: absolute;
	width: 11px;
	height: 11px;
	color: rgba(29, 31, 32, 0.55);
}
.kortti > .kulma::before,
.kortti > .kulma::after { content: ""; position: absolute; background: currentColor; }
.kortti > .kulma::before { left: 5px; top: 0; width: 1px; height: 100%; }
.kortti > .kulma::after { top: 5px; left: 0; width: 100%; height: 1px; }
.kortti > .kulma.tl { top: -6px; left: -6px; }
.kortti > .kulma.tr { top: -6px; right: -6px; }
.kortti > .kulma.bl { bottom: -6px; left: -6px; }
.kortti > .kulma.br { bottom: -6px; right: -6px; }

.sisalto { max-width: 780px; margin: 0 auto; }
.sisalto .kortti { max-width: none; margin-bottom: 22px; }

/* ---------- Typografia ---------- */

h1 {
	margin: 0 0 4px;
	color: var(--mg-text);
	font-family: var(--mg-heading);
	font-size: 30px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.05;
	text-transform: uppercase;
}

h2 {
	margin: 0 0 16px;
	font-family: var(--mg-heading);
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

p.ohje {
	margin: 0 0 24px;
	color: var(--mg-muted);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---------- Lomake ---------- */

label {
	display: block;
	margin-bottom: 5px;
	font-family: var(--mg-heading);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

input[type=text], input[type=password] {
	width: 100%;
	min-height: 38px;
	margin-bottom: 18px;
	padding: 9px 11px;
	background: var(--mg-surface);
	border: 1px solid var(--mg-border);
	border-radius: 0;
	color: var(--mg-text);
	font-family: inherit;
	font-size: 15px;
}

input[type=text]:focus, input[type=password]:focus {
	border-color: var(--mg-accent);
	box-shadow: 0 0 0 3px var(--mg-focus);
	outline: none;
}

button {
	min-height: 38px;
	padding: 10px 18px;
	background: var(--mg-accent);
	border: 1px solid var(--mg-accent-strong);
	border-radius: 0;
	color: #ffffff;
	cursor: pointer;
	font: 600 13px/1.2 var(--mg-heading);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: background 0.15s ease, border-color 0.15s ease;
}

button:hover { background: var(--mg-accent-strong); border-color: var(--mg-accent-deep); }
button:active { background: var(--mg-accent-deep); }
button.levea { width: 100%; }
button.harmaa { background: var(--mg-muted); border-color: #55595c; }
button.harmaa:hover { background: #55595c; border-color: var(--mg-text); }

.checkrivi { margin: -6px 0 18px; font-size: 14px; }
.checkrivi label {
	font-family: var(--mg-body);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}
.checkrivi input { margin-right: 7px; accent-color: var(--mg-accent); }

/* ---------- Ilmoitukset ---------- */

.virhe, .ok {
	margin-bottom: 20px;
	padding: 11px 13px;
	font-size: 14px;
}
.virhe { background: #f7e7e5; border-left: 3px solid var(--mg-danger); color: #7d2c23; }
.ok { background: #e7efe9; border-left: 3px solid var(--mg-ok); color: #2b4c34; }

/* ---------- Käyttäjätaulukko ---------- */

table {
	width: 100%;
	border-collapse: collapse;
	background: var(--mg-surface);
	border: 1px solid var(--mg-border);
	font-size: 13px;
}

th, td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--mg-border-soft);
	text-align: left;
	vertical-align: middle;
}

th {
	background: var(--mg-surface-soft);
	border-bottom: 1px solid var(--mg-border);
	font-family: var(--mg-heading);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

tbody tr:hover td { background: var(--mg-accent-soft); }
tr:last-child td { border-bottom: 0; }

.pois { color: var(--mg-danger); font-weight: 600; }
.rivilomake { display: inline; }
