/**
 * GuardHub Access Frontend & Admin Stylesheet
 * Strict theme isolation using hardcoded hex values with !important.
 */

/* Container and Card */
.gh-access-card {
	box-sizing: border-box !important;
	max-width: 440px !important;
	width: 100% !important;
	margin: 40px auto !important;
	padding: 32px 28px !important;
	background-color: #111827 !important;
	border: 1px solid #1f2937 !important;
	border-radius: 8px !important;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3) !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
	color: #f3f4f6 !important;
	line-height: 1.5 !important;
}

@media (max-width: 480px) {
	.gh-access-card {
		margin: 20px auto !important;
		padding: 24px 18px !important;
		border-radius: 6px !important;
	}
}

/* Header */
.gh-access-header {
	text-align: center !important;
	margin-bottom: 24px !important;
}

.gh-access-logo {
	max-height: 52px !important;
	max-width: 180px !important;
	margin: 0 auto 14px auto !important;
	display: block !important;
	object-fit: contain !important;
}

.gh-access-company-name {
	font-size: 13px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	color: #9ca3af !important;
	margin-bottom: 8px !important;
}

.gh-access-title {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	margin: 0 0 6px 0 !important;
	letter-spacing: -0.02em !important;
}

.gh-access-subtitle {
	font-size: 13px !important;
	color: #9ca3af !important;
	margin: 0 !important;
}

/* Alert Box */
.gh-access-alert-area {
	margin-bottom: 16px !important;
}

.gh-access-alert {
	padding: 12px 14px !important;
	border-radius: 6px !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	margin-bottom: 16px !important;
	box-sizing: border-box !important;
}

.gh-access-alert-error {
	background-color: #450a0a !important;
	color: #fecaca !important;
	border: 1px solid #7f1d1d !important;
}

.gh-access-alert-success {
	background-color: #064e3b !important;
	color: #a7f3d0 !important;
	border: 1px solid #065f46 !important;
}

.gh-access-alert-info {
	background-color: #1e293b !important;
	color: #93c5fd !important;
	border: 1px solid #334155 !important;
}

/* Form Fields */
.gh-access-form {
	display: flex !important;
	flex-direction: column !important;
	gap: 16px !important;
}

.gh-access-field {
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
	min-width: 0 !important;
}

.gh-access-label {
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #d1d5db !important;
	text-align: left !important;
	display: block !important;
}

.gh-access-input {
	box-sizing: border-box !important;
	width: 100% !important;
	height: 42px !important;
	padding: 8px 12px !important;
	background-color: #1f2937 !important;
	border: 1px solid #374151 !important;
	border-radius: 6px !important;
	color: #ffffff !important;
	font-size: 14px !important;
	outline: none !important;
	transition: border-color 0.15s ease-in-out !important;
}

.gh-access-input:focus {
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25) !important;
}

.gh-access-password-wrap {
	position: relative !important;
	width: 100% !important;
	box-sizing: border-box !important;
	display: flex !important;
	align-items: center !important;
}

.gh-access-password-input {
	padding-right: 42px !important;
}

.gh-access-toggle-pw {
	position: absolute !important;
	right: 4px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	background: transparent !important;
	border: none !important;
	color: #9ca3af !important;
	cursor: pointer !important;
	padding: 6px 8px !important;
	font-size: 16px !important;
	line-height: 1 !important;
	border-radius: 4px !important;
	box-sizing: border-box !important;
}

.gh-access-toggle-pw:hover {
	color: #ffffff !important;
}

/* Row for Remember Me & Forgot Password */
.gh-access-row {
	display: flex !important;
	align-items: center !important;
	min-width: 0 !important;
}

.gh-access-row-split {
	justify-content: space-between !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
}

.gh-access-checkbox-label {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 13px !important;
	color: #9ca3af !important;
	cursor: pointer !important;
	user-select: none !important;
}

.gh-access-checkbox {
	margin: 0 !important;
	width: 16px !important;
	height: 16px !important;
	accent-color: #2563eb !important;
	cursor: pointer !important;
}

/* Links & Buttons */
.gh-access-link {
	color: #60a5fa !important;
	font-size: 13px !important;
	text-decoration: none !important;
	transition: color 0.15s ease !important;
}

.gh-access-link:hover {
	color: #93c5fd !important;
	text-decoration: underline !important;
}

.gh-access-btn {
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 42px !important;
	padding: 0 16px !important;
	border-radius: 6px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	text-decoration: none !important;
	border: 1px solid transparent !important;
	transition: background-color 0.15s ease, opacity 0.15s ease !important;
}

.gh-access-btn-primary {
	background-color: #2563eb !important;
	color: #ffffff !important;
}

.gh-access-btn-primary:hover:not(:disabled) {
	background-color: #1d4ed8 !important;
}

.gh-access-btn-secondary {
	background-color: #1f2937 !important;
	color: #e5e7eb !important;
	border-color: #374151 !important;
}

.gh-access-btn-secondary:hover:not(:disabled) {
	background-color: #374151 !important;
}

.gh-access-btn:disabled {
	opacity: 0.55 !important;
	cursor: not-allowed !important;
}

.gh-access-footer-links {
	text-align: center !important;
	margin-top: 14px !important;
}

.gh-access-actions-row {
	display: flex !important;
	flex-direction: column !important;
	gap: 12px !important;
	align-items: center !important;
	margin-top: 16px !important;
}

.gh-access-status-text {
	text-align: center !important;
	font-size: 14px !important;
	color: #e5e7eb !important;
	margin-bottom: 12px !important;
}

/* Device Verification step */
.gh-access-code-box {
	display: flex !important;
	flex-direction: column !important;
	gap: 14px !important;
}

.gh-access-code-input {
	font-size: 24px !important;
	font-weight: 700 !important;
	letter-spacing: 0.3em !important;
	text-align: center !important;
	height: 52px !important;
	padding: 4px 10px !important;
}

.gh-access-resend-row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	margin-top: 6px !important;
	gap: 8px !important;
	flex-wrap: wrap !important;
	min-width: 0 !important;
}

.gh-access-resend-row .gh-access-link {
	white-space: nowrap !important;
	flex: 0 0 auto !important;
}

.gh-access-resend-row .gh-access-btn {
	flex: 1 1 140px !important;
	min-width: 0 !important;
}

/* Admin Styles */
.gh-admin-wrap {
	max-width: 1040px !important;
	margin-top: 20px !important;
}

.gh-admin-section {
	background: #ffffff !important;
	border: 1px solid #c3c4c7 !important;
	padding: 20px 24px !important;
	border-radius: 4px !important;
	margin-bottom: 24px !important;
}

.gh-admin-table-wrapper {
	width: 100% !important;
	overflow-x: auto !important;
	margin: 16px 0 !important;
}

.gh-admin-table {
	border-collapse: collapse !important;
	width: 100% !important;
}

.gh-badge {
	display: inline-block !important;
	padding: 3px 8px !important;
	border-radius: 4px !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
}

.gh-badge-status-success {
	background-color: #dcfce7 !important;
	color: #15803d !important;
	border: 1px solid #bbf7d0 !important;
}

.gh-badge-status-warning {
	background-color: #fef9c3 !important;
	color: #854d0e !important;
	border: 1px solid #fef08a !important;
}

.gh-badge-status-danger {
	background-color: #fee2e2 !important;
	color: #b91c1c !important;
	border: 1px solid #fecaca !important;
}

.gh-badge-status-info {
	background-color: #e0f2fe !important;
	color: #0369a1 !important;
	border: 1px solid #bae6fd !important;
}

.gh-badge-status-neutral {
	background-color: #f3f4f6 !important;
	color: #4b5563 !important;
	border: 1px solid #e5e7eb !important;
}


/* Theme guard (Astra paints every button blue with white text on hover and focus).
   Every state is declared again here, scoped under the plugin wrapper, in literal hex. */
.gh-access-card .gh-access-btn-primary:hover,
.gh-access-card .gh-access-btn-primary:focus,
.gh-access-card .gh-access-btn-primary:active {
	background-color: #1d4ed8 !important;
	border-color: transparent !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

.gh-access-card .gh-access-btn-primary:disabled {
	background-color: #2563eb !important;
}

.gh-access-card .gh-access-btn-secondary:hover,
.gh-access-card .gh-access-btn-secondary:focus,
.gh-access-card .gh-access-btn-secondary:active {
	background-color: #374151 !important;
	border-color: #374151 !important;
	color: #e5e7eb !important;
	box-shadow: none !important;
}

.gh-access-card .gh-access-toggle-pw:hover,
.gh-access-card .gh-access-toggle-pw:focus,
.gh-access-card .gh-access-toggle-pw:active {
	background: transparent !important;
	border: none !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

.gh-access-card a:focus {
	outline: none !important;
}

.gh-access-card a:focus-visible,
.gh-access-card button:focus-visible {
	outline: 2px solid #60a5fa !important;
	outline-offset: 2px !important;
}

.gh-access-card input[type="checkbox"] {
	accent-color: #2563eb !important;
}


/* Hide the theme's page title on authentication pages (the form has its own heading). */
body.gh-access-page .entry-header,
body.gh-access-page .entry-title,
body.gh-access-page h1.page-title {
	display: none !important;
}
