/* HarvestM8 site template. (C) 2026 BusinessM8 Limited
   Calm and clear: mostly neutral, green does the work, status colours only where they mean something. */

:root {
	--hm8-green: #1e3a2b;      /* deep vine: header, side menu */
	--hm8-green-2: #2a4d39;
	--hm8-primary: #2f6b45;    /* field green: buttons, links */
	--hm8-primary-hover: #25573a;
	--hm8-leaf: #8db86b;       /* current item, small accents */
	--hm8-wheat: #d4b25c;      /* rare highlights only */
	--hm8-ink: #1c2421;
	--hm8-muted: #5a6661;
	--hm8-line: #dce3de;
	--hm8-bg: #f5f7f3;
	--hm8-card: #ffffff;
	--hm8-ok: #2e7d4f;
	--hm8-warn: #b7791f;
	--hm8-bad: #b03a2e;
	--hm8-info: #2f5f8a;
	--hm8-radius: 8px;
	--hm8-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Bootstrap uses these, so Joomla's own forms pick up our colours. */
	--bs-body-font-family: var(--hm8-font);
	--bs-body-color: var(--hm8-ink);
	--bs-body-bg: #ffffff;        /* inputs and cards stay white; the page background is set on body */
	--bs-link-color: var(--hm8-primary);
	--bs-link-hover-color: var(--hm8-primary-hover);
	--bs-link-color-rgb: 47, 107, 69;
	--bs-link-hover-color-rgb: 37, 87, 58;
	--bs-border-color: var(--hm8-line);
	--bs-border-radius: 6px;
	--bs-primary: #2f6b45;
	--bs-primary-rgb: 47, 107, 69;
	--bs-focus-ring-color: rgba(47, 107, 69, .25);
}

html { -webkit-text-size-adjust: 100%; }

body.hm8t {
	margin: 0;
	font-family: var(--hm8-font);
	font-size: 16px;
	line-height: 1.55;
	color: var(--hm8-ink);
	background: var(--hm8-bg);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body.hm8t-bare { display: block; }

.hm8t h1, .hm8t h2, .hm8t h3 { color: var(--hm8-ink); font-weight: 650; line-height: 1.25; }
.hm8t h1 { font-size: 1.75rem; margin: 0 0 .6em; }
.hm8t h2 { font-size: 1.3rem; }
.hm8t a { color: var(--hm8-primary); }
.hm8t a:hover { color: var(--hm8-primary-hover); }
.hm8t :focus-visible { outline: 2px solid var(--hm8-primary); outline-offset: 2px; }

/* Bootstrap already does this; repeated so the layout never depends on it. */
.hm8t, .hm8t *, .hm8t *::before, .hm8t *::after { box-sizing: border-box; }
.hm8t-wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

.hm8t-skip {
	position: absolute; left: -9999px; top: 8px;
	background: var(--hm8-card); color: var(--hm8-ink); padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.hm8t-skip:focus { left: 8px; }

/* Header */
.hm8t-header { background: var(--hm8-green); color: #fff; }
.hm8t-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; }
.hm8t-logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.hm8t-logo img { display: block; width: 160px; height: auto; }
.hm8t .hm8t-logo, .hm8t .hm8t-logo:hover { color: #fff; }
.hm8t-logo-text { font-size: 1.25rem; font-weight: 700; letter-spacing: .01em; }
.hm8t-tagline { color: #c9dccf; font-size: .9rem; padding-left: 10px; border-left: 1px solid #3f6450; }

.hm8t-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.hm8t-menu a {
	display: block; padding: 8px 14px; border-radius: 6px;
	color: #e7efe9; text-decoration: none; font-weight: 500;
}
.hm8t .hm8t-menu a:hover { background: var(--hm8-green-2); color: #fff; }
.hm8t-menu .current > a, .hm8t-menu .active > a { background: var(--hm8-leaf); color: #12230f; }

.hm8t-banner { background: var(--hm8-card); border-bottom: 1px solid var(--hm8-line); padding: 28px 0; }

/* Body */
.hm8t-body { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; padding-bottom: 48px; }
.has-sidebar .hm8t-body { grid-template-columns: minmax(0, 1fr) 300px; }
.hm8t-main { min-width: 0; }

.hm8t-sidebar > * {
	background: var(--hm8-card); border: 1px solid var(--hm8-line); border-radius: var(--hm8-radius);
	padding: 18px 20px; margin-bottom: 16px;
}
.hm8t-sidebar h3 { font-size: 1.05rem; margin: 0 0 8px; }

/* Log-in and two-step pages: one clear card in the middle. */
.is-auth .hm8t-body { grid-template-columns: minmax(0, 1fr); align-content: start; }
.is-auth .hm8t-main {
	width: 100%; max-width: 480px; margin: 24px auto 0;
	background: var(--hm8-card); border: 1px solid var(--hm8-line); border-radius: var(--hm8-radius);
	padding: 32px 32px 28px; box-shadow: 0 1px 2px rgba(28, 36, 33, .04);
}
.view-methods .hm8t-main, .view-profile .hm8t-main { max-width: 760px; }
.is-auth .hm8t-main .page-header h1 { font-size: 1.5rem; }

/* Forms and buttons (Joomla core layouts use Bootstrap classes) */
.hm8t .form-control, .hm8t .form-select {
	border-color: #c7d1ca; border-radius: 6px; padding: .55rem .75rem; font-size: 1rem;
}
.hm8t .form-control:focus, .hm8t .form-select:focus {
	border-color: var(--hm8-primary); box-shadow: 0 0 0 .2rem rgba(47, 107, 69, .18);
}
.hm8t .form-check-input:checked { background-color: var(--hm8-primary); border-color: var(--hm8-primary); }
.hm8t label { font-weight: 550; margin-bottom: 4px; }

.hm8t .btn { border-radius: 6px; font-weight: 600; padding: .55rem 1.1rem; }
.hm8t .btn-primary, .hm8t-btn {
	background: var(--hm8-primary); border: 1px solid var(--hm8-primary); color: #fff;
}
.hm8t .btn-primary:hover, .hm8t .btn-primary:focus, .hm8t-btn:hover {
	background: var(--hm8-primary-hover); border-color: var(--hm8-primary-hover); color: #fff;
}
.hm8t .btn-secondary, .hm8t .btn-outline-secondary {
	background: var(--hm8-card); border: 1px solid #c7d1ca; color: var(--hm8-ink);
}
.hm8t .btn-secondary:hover, .hm8t .btn-outline-secondary:hover { background: var(--hm8-bg); color: var(--hm8-ink); }
.hm8t .btn-danger, .hm8t a.btn-danger { background: var(--hm8-bad); border-color: var(--hm8-bad); color: #fff; }
.hm8t .btn-danger:hover, .hm8t a.btn-danger:hover, .hm8t .btn-danger:focus { background: #8e2e24; border-color: #8e2e24; color: #fff; }
.hm8t a.btn-primary, .hm8t a.btn-primary:hover, .hm8t a.btn-secondary { text-decoration: none; }
.hm8t-btn { display: inline-block; padding: 9px 18px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.hm8t a.hm8t-btn, .hm8t a.hm8t-btn:hover { color: #fff; }

.hm8t .card { border-color: var(--hm8-line); border-radius: var(--hm8-radius); }

/* Messages: clear colours, left stripe so they read at a glance. */
.hm8t #system-message-container joomla-alert,
.hm8t .alert {
	border-radius: 6px; border: 1px solid var(--hm8-line); border-left-width: 5px;
	background: var(--hm8-card); color: var(--hm8-ink); margin-bottom: 18px;
}
.hm8t joomla-alert[type="success"], .hm8t .alert-success { border-left-color: var(--hm8-ok); }
.hm8t joomla-alert[type="warning"], .hm8t .alert-warning { border-left-color: var(--hm8-warn); }
.hm8t joomla-alert[type="danger"], .hm8t .alert-danger { border-left-color: var(--hm8-bad); }
.hm8t joomla-alert[type="info"], .hm8t .alert-info { border-left-color: var(--hm8-info); }

/* Tables */
.hm8t table { border-color: var(--hm8-line); }
.hm8t .table > :not(caption) > * > * { padding: .7rem .85rem; }
.hm8t .table thead th { color: var(--hm8-muted); font-weight: 600; font-size: .9rem; border-bottom-color: var(--hm8-line); }

/* Footer */
.hm8t-footer { background: var(--hm8-card); border-top: 1px solid var(--hm8-line); color: var(--hm8-muted); font-size: .9rem; }
.hm8t-footer-inner { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.hm8t-copy { margin: 0; }
.hm8t-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; }

/* Error page */
.hm8t-error {
	max-width: 520px; margin: 12vh auto 0; padding: 36px 32px; text-align: center;
	background: var(--hm8-card); border: 1px solid var(--hm8-line); border-radius: var(--hm8-radius);
}
.hm8t-error-code { color: var(--hm8-muted); font-weight: 700; letter-spacing: .08em; margin: 14px 0 4px; }
.hm8t-error-debug { text-align: left; background: var(--hm8-bg); padding: 12px; border-radius: 6px; white-space: pre-wrap; font-size: .85rem; }

/* Phones */
@media (max-width: 760px) {
	.hm8t-header-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 12px; padding-bottom: 10px; }
	.hm8t-tagline { display: none; }
	.hm8t-menu ul { overflow-x: auto; flex-wrap: nowrap; }
	.has-sidebar .hm8t-body { grid-template-columns: minmax(0, 1fr); }
	.hm8t-body { padding-top: 20px; }
	.is-auth .hm8t-main { padding: 24px 20px; margin-top: 8px; }
}

@media print {
	.hm8t-header, .hm8t-footer, .hm8t-sidebar, .hm8t-skip { display: none; }
	body.hm8t { background: #fff; }
}

/* Two-step code page (0.4.8): the card is narrow, so labels sit above the box and the buttons stack. */
.view-captive .users-mfa-captive { border: 0; padding: 0; background: transparent; }
.view-captive .users-mfa-captive h2, .view-captive .users-mfa-captive h3 { font-size: 1.35rem; margin-bottom: 12px; }
.view-captive .form-horizontal .row > [class*="col-sm-"] { flex: 0 0 100%; max-width: 100%; width: 100%; margin-left: 0; }
.view-captive .col-form-label { padding-top: 0; padding-bottom: 6px; }
.view-captive #users-mfa-captive-form-standard-buttons { margin-top: 8px !important; }
.view-captive #users-mfa-captive-form-standard-buttons .btn-primary { width: 100%; margin: 0 0 12px !important; }
.view-captive #users-mfa-captive-button-logout { display: inline-block; font-size: .95rem; padding: .45rem .9rem; }
.view-captive #users-mfa-captive-form-choose-another { margin-top: 6px !important; }
.view-captive .users-mfa-captive-pre-message { font-size: 1rem; }

/* Joomla log-in form details (0.1.1) */
.is-auth fieldset { border: 0; padding: 0; margin: 0; }
.is-auth .control-group, .is-auth .mb-3 { margin-bottom: 14px; }
.hm8t .form-control, .hm8t .form-select, .hm8t .list-group-item { background-color: #fff; }
.hm8t .form-check-input { border-color: #9aa7a0; background-color: #fff; }
.is-auth .input-group { flex-wrap: nowrap; }
.is-auth .input-group .btn { border-color: #c7d1ca; }
.is-auth .btn-primary { width: 100%; padding: .65rem 1rem; }
.hm8t .plg_system_webauthn_login_button {
	display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 12px;
}
.hm8t .plg_system_webauthn_login_button svg { width: 22px; height: 22px; flex: 0 0 22px; }
.is-auth .com-users-login__options { margin-top: 14px; font-size: .95rem; }
.is-auth .com-users-login__options a { display: block; margin-top: 4px; }
/* 0.4.22: the authenticator app box on the two-step set-up pages */
.hm8t-authapp { max-width: 640px; margin: 0 auto 22px; padding: 16px 20px; border: 1px solid #cfe3d6; border-left: 5px solid #017435; border-radius: 10px; background: #f3faf5; }
.hm8t-authapp h2 { font-size: 1.15rem; margin: 0 0 6px; }
.hm8t-authapp p { margin: 0 0 8px; }
.hm8t-authapp ul { margin: 0 0 8px; padding-left: 1.2rem; }
.hm8t-authapp li { margin: 2px 0; }
.hm8t-authapp .hm8t-authapp-then { margin: 0; color: #3f4f46; }

