/* ============================================================================
   InsuranceMonster - clientSite (customer portal)

   Ported from the ShieldKnot client portal, restyled onto the InsuranceMonster
   design system. Tokens mirror rootSite/css/site.css so the portal reads as the
   same product as the marketing site (Nunito, soft green, rounded, friendly).

   ShieldKnot's --sk-* custom properties are deliberately renamed to --im-*, and
   its Tailwind dump is not carried over - this file is the whole stylesheet.
   All styling lives here; no inline style attributes (project rule).

   Structure: 1) Tokens  2) Base  3) Components  4) Auth  5) App shell  6) Responsive
   ============================================================================ */

/* 1) TOKENS ---------------------------------------------------------------- */
:root {
	/* Brand green (from the logo + app icon) */
	--im-brand-700: #4a8a22;
	--im-brand-600: #5ea32e;
	--im-brand-500: #7cc242;
	--im-brand-300: #a6d977;
	--im-brand-100: #e2f2cf;
	--im-brand-50:  #f0f8e6;

	/* Ink / navy (from the wordmark) */
	--im-ink:      #17233a;
	--im-ink-soft: #2b3a52;

	/* Neutrals */
	--im-n-0:   #ffffff;
	--im-n-50:  #f5f8f3;
	--im-n-100: #eef2ea;

	/* Semantic */
	--im-text:        #17233a;
	--im-text-muted:  #5c6a76;
	--im-bg:          #ffffff;
	--im-bg-tint:     #f4f8f0;
	--im-border:      #e7ede1;
	--im-border-strong: #d7e0cd;
	--im-btn-ink:     #14261a;

	--im-danger-bg: #fdecea; --im-danger-line: #f5c2bd; --im-danger-ink: #a12a1c;
	--im-ok-bg:     #eaf7e4; --im-ok-line:     #c3e6b4; --im-ok-ink:     #2f6b1c;

	/* Radius / shadow / spacing / type */
	--im-r-sm: 10px; --im-r-md: 16px; --im-r-lg: 24px; --im-r-pill: 999px;
	--im-shadow-sm: 0 1px 2px rgba(20,40,20,.05), 0 3px 10px rgba(20,40,20,.05);
	--im-shadow-md: 0 12px 34px rgba(20,40,20,.09);
	--im-s2: 8px; --im-s3: 12px; --im-s4: 16px; --im-s5: 24px; --im-s6: 32px; --im-s7: 48px;
	--im-font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--im-fs-sm: 0.92rem;
	--im-fs-xs: 0.8rem;
	--im-maxw: 1180px;
}

/* 2) BASE ------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--im-font);
	font-weight: 600;
	color: var(--im-text);
	background: var(--im-bg);
	line-height: 1.6;
}
h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0 0 var(--im-s3); color: var(--im-ink); letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 var(--im-s3); }
a { color: var(--im-brand-700); }
img { max-width: 100%; height: auto; display: block; }
.im-muted { color: var(--im-text-muted); }
.im-wrap { width: 100%; max-width: var(--im-maxw); margin: 0 auto; padding: 0 var(--im-s5); }
.im-skip { position: absolute; left: -9999px; }
.im-skip:focus { left: var(--im-s4); top: var(--im-s4); z-index: 100; background: var(--im-n-0); padding: var(--im-s3); border-radius: var(--im-r-sm); }

/* 3) COMPONENTS ------------------------------------------------------------ */
.im-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	font-family: inherit; font-weight: 800; font-size: 1rem; line-height: 1;
	padding: 14px 26px; border-radius: var(--im-r-pill); border: 2px solid transparent;
	background: var(--im-brand-500); color: var(--im-btn-ink);
	text-decoration: none; cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.im-btn:hover { background: var(--im-brand-600); }
.im-btn:disabled { opacity: .6; cursor: default; }
.im-btn-block { width: 100%; }
.im-btn-ghost { background: transparent; color: var(--im-ink); border-color: var(--im-border-strong); }
.im-btn-ghost:hover { background: transparent; border-color: var(--im-brand-500); color: var(--im-brand-700); }
.im-btn-sm { padding: 9px 16px; font-size: var(--im-fs-sm); }

.im-field { margin-bottom: var(--im-s4); }
.im-label { display: block; font-weight: 800; font-size: var(--im-fs-sm); margin-bottom: 6px; color: var(--im-ink); }
.im-input {
	width: 100%; font-family: inherit; font-size: 1rem; font-weight: 600;
	padding: 13px 15px; border: 1px solid var(--im-border-strong); border-radius: var(--im-r-sm);
	background: var(--im-n-0); color: var(--im-text);
}
.im-input:focus { outline: 2px solid var(--im-brand-500); outline-offset: 1px; border-color: var(--im-brand-500); }

/* Inline form/status message. Empty by default, colour added by JS. */
.im-msg { min-height: 22px; font-size: var(--im-fs-sm); font-weight: 700; margin-bottom: var(--im-s3); }
.im-msg-error { color: var(--im-danger-ink); background: var(--im-danger-bg); border: 1px solid var(--im-danger-line); border-radius: var(--im-r-sm); padding: 9px 12px; }
.im-msg-ok { color: var(--im-ok-ink); background: var(--im-ok-bg); border: 1px solid var(--im-ok-line); border-radius: var(--im-r-sm); padding: 9px 12px; }

.im-card { background: var(--im-n-0); border: 1px solid var(--im-border); border-radius: var(--im-r-lg); padding: var(--im-s6); box-shadow: var(--im-shadow-sm); }
.im-badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--im-fs-xs); font-weight: 800; padding: 5px 11px; border-radius: var(--im-r-pill); background: var(--im-brand-100); color: var(--im-brand-700); }

/* 4) AUTH (login / activate / reset) --------------------------------------- */
/* Two-panel: brand story on the left, form on the right. Mirrors the ShieldKnot
   login layout, restyled on IM tokens. */
.im-auth { background: var(--im-bg-tint); }
.im-login-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }

/* The brand panel centres a fixed-width column so its content does not drift
   apart on a wide screen. */
.im-login-brand {
	background: linear-gradient(180deg, var(--im-brand-50), var(--im-bg-tint));
	padding: var(--im-s7); display: flex; flex-direction: column; justify-content: center;
	align-items: flex-start;
	border-right: 1px solid var(--im-border);
}
.im-login-brand > * { max-width: 420px; }
.im-login-logo { max-width: 290px; margin-bottom: var(--im-s5); }
.im-login-art { width: 200px; margin: var(--im-s6) 0 0 auto; }
.im-login-tag { font-size: 1.2rem; font-weight: 800; color: var(--im-ink); max-width: 34ch; margin-bottom: var(--im-s6); }
.im-login-features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--im-s4); }
.im-login-features li { display: flex; align-items: center; gap: var(--im-s3); font-size: var(--im-fs-sm); font-weight: 700; }
.im-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--im-brand-100); color: var(--im-brand-700); }
.im-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.im-login-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: var(--im-s7) var(--im-s5); }
.im-login-card { width: 100%; max-width: 400px; background: var(--im-n-0); border: 1px solid var(--im-border); border-radius: var(--im-r-lg); padding: var(--im-s6); box-shadow: var(--im-shadow-md); }
.im-login-card-head { margin-bottom: var(--im-s5); }
.im-login-card-head h1 { margin-bottom: 4px; }
.im-login-card-head p { margin: 0; font-size: var(--im-fs-sm); }
.im-login-links { margin: var(--im-s4) 0 0; text-align: center; font-size: var(--im-fs-sm); }
.im-login-links a { font-weight: 800; text-decoration: none; }
.im-login-links a:hover { text-decoration: underline; }
.im-login-foot { margin-top: var(--im-s5); font-size: var(--im-fs-xs); text-align: center; }

/* 5) APP SHELL (logged-in portal) ------------------------------------------ */
.im-header { background: var(--im-n-0); border-bottom: 1px solid var(--im-border); position: sticky; top: 0; z-index: 40; }
.im-header .im-wrap { display: flex; align-items: center; gap: var(--im-s5); height: 74px; }
.im-header-brand img { height: 46px; width: auto; }
.im-nav { margin-left: auto; }
.im-nav ul { list-style: none; display: flex; align-items: center; gap: var(--im-s5); margin: 0; padding: 0; }
.im-nav a { text-decoration: none; color: var(--im-ink); font-weight: 700; font-size: var(--im-fs-sm); }
.im-nav a:hover, .im-nav a[aria-current="page"] { color: var(--im-brand-700); }

.im-main { padding: var(--im-s6) 0 var(--im-s7); background: var(--im-bg-tint); min-height: calc(100vh - 74px); }
.im-page-head { margin-bottom: var(--im-s5); }
.im-page-head h1 { margin-bottom: 4px; }
.im-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--im-s5); }
.im-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: var(--im-s2) var(--im-s5); font-size: var(--im-fs-sm); }
.im-dl dt { font-weight: 800; color: var(--im-text-muted); }
.im-dl dd { margin: 0; font-weight: 700; }

.im-footer { background: var(--im-n-0); border-top: 1px solid var(--im-border); padding: var(--im-s5) 0; font-size: var(--im-fs-xs); color: var(--im-text-muted); }

/* 6) RESPONSIVE ------------------------------------------------------------ */
@media (max-width: 900px) {
	.im-login-wrap { grid-template-columns: 1fr; min-height: 0; }
	.im-login-brand { border-right: 0; border-bottom: 1px solid var(--im-border); padding: var(--im-s6) var(--im-s5); }
	.im-login-features, .im-login-art { display: none; }
	.im-login-logo { max-width: 220px; margin-bottom: var(--im-s3); }
	.im-login-form { padding: var(--im-s6) var(--im-s5); }
	.im-grid { grid-template-columns: 1fr; }
	.im-header .im-wrap { height: auto; padding-top: var(--im-s3); padding-bottom: var(--im-s3); flex-wrap: wrap; gap: var(--im-s3); }
	.im-nav ul { gap: var(--im-s4); flex-wrap: wrap; }
}
