/*
Theme Name: Technician Monitor Theme
Theme URI: https://www.example.com/technician-monitor-theme
Author: Wei Yun
Description: Companion theme for the Technician Monitor Pro plugin. Provides a branded, mobile-first front end for the technician check-in portal and the company admin dashboard. Requires the "Technician Monitor Pro" plugin to be active.
Version: 1.1.0
Requires PHP: 7.4
Text Domain: technician-monitor-theme
*/

:root {
	--tmp-primary: #4f46e5;
	--tmp-primary-dark: #3730a3;
	--tmp-accent: #ec4899;
	--tmp-accent-2: #06b6d4;
	--tmp-success: #059669;
	--tmp-danger: #dc2626;
	--tmp-text: #1e1b3a;
	--tmp-text-muted: #64607d;
	--tmp-bg: #f3f2fb;
	--tmp-radius: 18px;
	--tmp-radius-sm: 12px;
	--tmp-glass-bg: rgba(255, 255, 255, .62);
	--tmp-glass-bg-strong: rgba(255, 255, 255, .82);
	--tmp-glass-border: rgba(255, 255, 255, .55);
	--tmp-glass-shadow: 0 8px 32px rgba(79, 70, 229, .12), 0 2px 8px rgba(30, 27, 58, .06);
	--tmp-hero-gradient: linear-gradient(135deg, #4338ca 0%, #6d28d9 42%, #db2777 100%);
}

* { box-sizing: border-box; }

body {
	background:
		radial-gradient(900px 500px at 8% -8%, rgba(199, 210, 254, .55), transparent 60%),
		radial-gradient(800px 500px at 92% 4%, rgba(165, 243, 252, .45), transparent 60%),
		radial-gradient(900px 600px at 50% 110%, rgba(251, 207, 232, .4), transparent 60%),
		linear-gradient(180deg, #f8f8fd 0%, var(--tmp-bg) 100%);
	background-attachment: fixed;
	color: var(--tmp-text);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; letter-spacing: -.02em; }

.tmp-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ---- Glass utility ---- */

.tmp-glass {
	background: var(--tmp-glass-bg);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid var(--tmp-glass-border);
	box-shadow: var(--tmp-glass-shadow);
}

.tmp-header {
	background: rgba(255, 255, 255, .7);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border-bottom: 1px solid rgba(255, 255, 255, .5);
	padding: 14px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	position: sticky;
	top: 0;
	z-index: 50;
}
.tmp-header img.tmp-logo { height: 32px; }
.tmp-header .tmp-company-name { font-weight: 600; font-size: 16px; }

.tmp-main {
	flex: 1;
	padding: 20px;
	max-width: 480px;
	margin: 0 auto;
	width: 100%;
}

.tmp-footer {
	text-align: center;
	padding: 16px;
	font-size: 12px;
	color: var(--tmp-text-muted);
}

.tmp-card {
	background: var(--tmp-glass-bg-strong);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	backdrop-filter: blur(18px) saturate(160%);
	border: 1px solid var(--tmp-glass-border);
	border-radius: var(--tmp-radius);
	padding: 28px;
	box-shadow: var(--tmp-glass-shadow);
	text-align: center;
}

/* ==========================================================================
   Marketing homepage
   ========================================================================== */

.tmp-header { justify-content: space-between; }
.tmp-header-brand { text-decoration: none; color: inherit; display: flex; align-items: center; font-weight: 700; }
.tmp-header-marketing { padding: 14px 32px; }
.tmp-header-nav { display: flex; gap: 28px; margin-left: auto; margin-right: 24px; }
.tmp-header-nav a { color: var(--tmp-text); text-decoration: none; font-size: 14px; font-weight: 600; opacity: .8; transition: opacity .15s; }
.tmp-header-nav a:hover { opacity: 1; color: var(--tmp-primary); }
.tmp-header-actions { display: flex; gap: 10px; }

.tmp-main-home { max-width: none; width: 100%; padding: 0; margin: 0; }

/* --- Hero --- */

.tmp-hero {
	position: relative;
	overflow: hidden;
	background: var(--tmp-hero-gradient);
	padding: 110px 24px 150px;
	text-align: center;
	color: #fff;
	isolation: isolate;
}
.tmp-hero-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: .55;
	z-index: -1;
	pointer-events: none;
}
.tmp-hero-blob-1 { width: 420px; height: 420px; background: #f472b6; top: -160px; left: -100px; }
.tmp-hero-blob-2 { width: 380px; height: 380px; background: #22d3ee; bottom: -180px; right: -80px; }
.tmp-hero-blob-3 { width: 300px; height: 300px; background: #a78bfa; top: 40%; left: 60%; opacity: .35; }

.tmp-hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }
.tmp-eyebrow {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: #fff;
	background: rgba(255, 255, 255, .16);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, .35);
	padding: 7px 16px; border-radius: 999px; margin-bottom: 24px;
}
.tmp-hero h1 { font-size: 44px; line-height: 1.18; margin: 0 0 18px; font-weight: 800; }
.tmp-hero-sub { font-size: 18px; color: rgba(255, 255, 255, .88); margin: 0 0 36px; line-height: 1.65; max-width: 600px; margin-left: auto; margin-right: auto; }
.tmp-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.tmp-btn-large { padding: 15px 30px; font-size: 15px; }

/* --- Sections & tiles --- */

.tmp-section { padding: 64px 24px; position: relative; }
.tmp-section-alt { background: transparent; }
.tmp-section-inner { max-width: 1100px; margin: 0 auto; }
.tmp-section-title { text-align: center; font-size: 30px; margin: 0 0 12px; font-weight: 800; }
.tmp-section-subtitle { text-align: center; font-size: 15px; color: var(--tmp-text-muted); max-width: 560px; margin: 0 auto 44px; line-height: 1.6; }

.tmp-features-wrap { margin-top: -96px; z-index: 2; position: relative; }

.tmp-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.tmp-feature-card {
	background: var(--tmp-glass-bg-strong);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	backdrop-filter: blur(20px) saturate(160%);
	border: 1px solid var(--tmp-glass-border);
	border-radius: var(--tmp-radius);
	padding: 28px;
	text-align: left;
	box-shadow: var(--tmp-glass-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
}
.tmp-feature-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 44px rgba(79, 70, 229, .18), 0 4px 12px rgba(30, 27, 58, .08);
}
.tmp-feature-icon {
	width: 52px; height: 52px; border-radius: 14px;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--tmp-primary), var(--tmp-accent));
	color: #fff;
	margin-bottom: 18px;
	box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}
.tmp-feature-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.tmp-feature-card p { margin: 0; font-size: 14px; color: var(--tmp-text-muted); line-height: 1.65; }

/* --- Steps --- */

.tmp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; position: relative; }
.tmp-step {
	text-align: left;
	background: var(--tmp-glass-bg);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid var(--tmp-glass-border);
	border-radius: var(--tmp-radius);
	padding: 24px;
	box-shadow: var(--tmp-glass-shadow);
}
.tmp-step-number {
	width: 38px; height: 38px; border-radius: 12px;
	background: linear-gradient(135deg, var(--tmp-primary), var(--tmp-accent-2));
	color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 14px;
	box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}
.tmp-step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.tmp-step p { margin: 0; font-size: 14px; color: var(--tmp-text-muted); line-height: 1.6; }

/* --- CTA band --- */

.tmp-cta-band {
	background: var(--tmp-hero-gradient);
	color: #fff;
	text-align: center;
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	max-width: 1100px;
	margin: 24px auto;
	padding: 64px 24px;
}
.tmp-cta-inner h2 { margin: 0 0 10px; font-size: 28px; font-weight: 800; }
.tmp-cta-inner p { margin: 0 0 28px; opacity: .9; font-size: 15px; }
.tmp-cta-band .tmp-btn {
	border-color: rgba(255, 255, 255, .4);
	color: #fff;
	background: rgba(255, 255, 255, .12);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.tmp-cta-band .tmp-btn-primary { background: #fff; color: var(--tmp-primary-dark); border-color: #fff; }

/* --- Footer --- */

.tmp-footer-marketing { background: linear-gradient(180deg, #1e1b3a 0%, #14122a 100%); color: #cfcbe6; text-align: left; padding: 0; margin-top: 40px; }
.tmp-footer-inner { max-width: 1100px; margin: 0 auto; padding: 48px 24px; display: flex; gap: 64px; flex-wrap: wrap; }
.tmp-footer-col { flex: 1; min-width: 200px; }
.tmp-footer-col strong { color: #fff; font-size: 16px; }
.tmp-footer-col p { font-size: 13px; line-height: 1.6; margin: 8px 0 0; }
.tmp-footer-heading { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #8b85b3; margin-bottom: 10px; }
.tmp-footer-col a { display: block; color: #cfcbe6; text-decoration: none; font-size: 14px; padding: 4px 0; }
.tmp-footer-col a:hover { color: #fff; }
.tmp-footer-bottom { text-align: center; padding: 16px; font-size: 12px; color: #726d99; border-top: 1px solid rgba(255,255,255,.08); }

@media (max-width: 640px) {
	.tmp-header-nav { display: none; }
	.tmp-hero h1 { font-size: 30px; }
	.tmp-features-wrap { margin-top: -60px; }
}

/* ==========================================================================
   Management portal
   ========================================================================== */

body.page-template-page-portal .tmp-main { max-width: 1100px; }

.tmp-portal-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 16px;
	background: var(--tmp-glass-bg-strong);
	-webkit-backdrop-filter: blur(16px) saturate(160%);
	backdrop-filter: blur(16px) saturate(160%);
	border: 1px solid var(--tmp-glass-border);
	border-radius: 14px;
	padding: 5px;
	box-shadow: var(--tmp-glass-shadow);
}
.tmp-tab {
	flex: 1;
	text-align: center;
	padding: 10px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--tmp-text);
	font-weight: 600;
	font-size: 14px;
	transition: background .2s;
}
.tmp-tab.is-active { background: linear-gradient(135deg, var(--tmp-primary), var(--tmp-accent)); color: #fff; }

.tmp-notice { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.tmp-notice-success { background: rgba(5, 150, 105, .12); color: #047857; }
.tmp-notice-warn { background: rgba(217, 119, 6, .12); color: #92400e; }

.tmp-card-wide {
	text-align: left;
	max-width: none;
	margin-bottom: 16px;
	background: var(--tmp-glass-bg-strong);
}

.tmp-form label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.tmp-form input[type=text], .tmp-form input[type=email], .tmp-form input[type=number],
.tmp-form input[type=date], .tmp-form select {
	display: block; width: 100%; margin-top: 4px; padding: 9px 12px;
	border: 1px solid rgba(30, 27, 58, .14); border-radius: 10px; font-size: 14px; font-weight: normal;
	background: rgba(255, 255, 255, .7);
}
.tmp-form input:focus, .tmp-form select:focus { outline: 2px solid var(--tmp-primary); outline-offset: 1px; }
.tmp-form-row { display: flex; gap: 12px; }
.tmp-form-row label { flex: 1; }
.tmp-form-inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.tmp-form-inline label { margin-bottom: 0; }
.tmp-checkbox-label { display: flex; align-items: center; gap: 6px; font-weight: normal; }

.tmp-btn {
	display: inline-block; padding: 10px 18px; border-radius: 999px;
	border: 1px solid rgba(30, 27, 58, .14);
	background: rgba(255, 255, 255, .6);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: var(--tmp-text); text-decoration: none; cursor: pointer; font-size: 14px;
	transition: transform .15s ease, box-shadow .15s ease;
}
.tmp-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(30, 27, 58, .1); }
.tmp-btn-primary { background: linear-gradient(135deg, var(--tmp-primary), var(--tmp-accent)); border-color: transparent; color: #fff; }
.tmp-btn-danger { background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .2); color: #b91c1c; }
.tmp-btn-small { padding: 6px 12px; font-size: 13px; }
.tmp-btn-tiny { padding: 3px 8px; font-size: 12px; }
.tmp-btn.is-active { background: linear-gradient(135deg, var(--tmp-primary), var(--tmp-accent)); color: #fff; }

.tmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tmp-table th, .tmp-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(30, 27, 58, .08); vertical-align: top; }
.tmp-row-flagged { background: rgba(217, 119, 6, .06); }

.tmp-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tmp-site-tile {
	border: 1px solid var(--tmp-glass-border);
	background: rgba(255, 255, 255, .5);
	border-radius: 14px; padding: 18px; text-align: center;
}
.tmp-tile-actions { margin-top: 10px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

.tmp-device-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; }

.tmp-pagination { margin-top: 12px; display: flex; gap: 4px; }
.tmp-muted { color: var(--tmp-text-muted); font-size: 13px; }

.tmp-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tmp-badge-checkin { background: rgba(5, 150, 105, .14); color: #047857; }
.tmp-badge-checkout { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.tmp-ok { color: #047857; font-weight: 600; }
.tmp-bad { color: #b91c1c; font-weight: 600; }
.tmp-hint { font-size: 12px; color: var(--tmp-text-muted); margin: 8px 0 16px; }

/* ==========================================================================
   Login page
   ========================================================================== */

.tmp-login-wrap { display: flex; justify-content: center; align-items: center; padding: 60px 20px; min-height: calc(100vh - 200px); }
.tmp-login-card { width: 100%; max-width: 400px; }
.tmp-login-logo img { max-height: 48px; margin: 0 auto 8px; }
.tmp-login-title { font-size: 24px; margin: 0 0 4px; font-weight: 800; }
.tmp-login-subtitle { color: var(--tmp-text-muted); font-size: 14px; margin: 0 0 24px; }
.tmp-login-form label { text-align: left; }
.tmp-btn-block { display: block; width: 100%; text-align: center; margin-top: 10px; padding: 12px 18px; }
.tmp-login-forgot { margin-top: 16px; font-size: 13px; }
.tmp-login-forgot a { color: var(--tmp-primary); text-decoration: none; font-weight: 600; }
.tmp-notice-error { background: rgba(220, 38, 38, .1); color: #b91c1c; }

/* ==========================================================================
   Check-in flow (loaded from the plugin templates)
   ========================================================================== */

.tmp-checkin-wrap.tmp-card { max-width: 420px; margin: 40px auto; }
