/**
 * EARA Portal Dashboard — Premium Styles
 * Matches the survey tool and field app design language.
 */

/* ── Shell ───────────────────────────────────────────────────────────────── */

.eara-dashboard {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	max-width: 720px;
	margin: 0 auto;
	padding-bottom: 40px;
}

/* ── Welcome banner ───────────────────────────────────────────────────────── */

.eara-dashboard__welcome {
	background: linear-gradient(135deg, #0f2444 0%, #1e3a5f 50%, #1d4ed8 100%);
	border-radius: 16px;
	padding: 24px 20px;
	margin-bottom: 20px;
	color: #fff;
}

.eara-dashboard__welcome-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.eara-dashboard__greeting {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 6px;
	color: #fff;
	letter-spacing: -.02em;
}

.eara-dashboard__tagline {
	font-size: 13px;
	color: #93c5fd;
	margin: 0;
	line-height: 1.5;
	max-width: 340px;
}

/* Progress ring */
.eara-dashboard__welcome-badge {
	flex-shrink: 0;
	text-align: center;
}

.eara-dashboard__pct-ring {
	position: relative;
	width: 80px;
	height: 80px;
	margin: 0 auto 4px;
}

.eara-dashboard__pct-ring svg {
	transform: none;
}

.eara-dashboard__pct-num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 700;
	color: #fff;
}

.eara-dashboard__pct-label {
	font-size: 10px;
	color: #93c5fd;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 600;
}

/* ── Stat cards ───────────────────────────────────────────────────────────── */

.eara-dashboard__stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 16px;
}

.eara-dashboard__stat {
	background: #fff;
	border-radius: 12px;
	padding: 16px 14px;
	border: 2px solid #e2e8f0;
	transition: transform .15s, box-shadow .15s;
}

.eara-dashboard__stat:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.eara-dashboard__stat-icon {
	font-size: 22px;
	margin-bottom: 8px;
	line-height: 1;
}

.eara-dashboard__stat-num {
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 4px;
}

.eara-dashboard__stat-lbl {
	font-size: 11px;
	color: #64748b;
	font-weight: 500;
	line-height: 1.3;
}

.eara-dashboard__stat--blue  { border-color: #bfdbfe; }
.eara-dashboard__stat--blue  .eara-dashboard__stat-num { color: #1e40af; }

.eara-dashboard__stat--green { border-color: #bbf7d0; }
.eara-dashboard__stat--green .eara-dashboard__stat-num { color: #15803d; }

.eara-dashboard__stat--amber { border-color: #fde68a; }
.eara-dashboard__stat--amber .eara-dashboard__stat-num { color: #b45309; }

.eara-dashboard__stat--red   { border-color: #fecaca; }
.eara-dashboard__stat--red   .eara-dashboard__stat-num { color: #b91c1c; }

/* ── Progress card ────────────────────────────────────────────────────────── */

.eara-dashboard__progress-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 18px 20px;
	margin-bottom: 24px;
	box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.eara-dashboard__progress-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.eara-dashboard__progress-title {
	font-size: 14px;
	font-weight: 700;
	color: #1e3a5f;
}

.eara-dashboard__progress-pct {
	font-size: 14px;
	font-weight: 700;
	color: #1e40af;
}

.eara-dashboard__progress-track {
	height: 12px;
	background: #e5e7eb;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 10px;
}

.eara-dashboard__progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #1e3a5f, #2563eb);
	border-radius: 8px;
	transition: width .6s ease;
}

.eara-dashboard__progress-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.eara-dashboard__legend {
	font-size: 12px;
	font-weight: 600;
}

.eara-dashboard__legend--green { color: #065f46; }
.eara-dashboard__legend--amber { color: #92400e; }
.eara-dashboard__legend--red   { color: #991b1b; }
.eara-dashboard__legend--blue  { color: #1e40af; }

/* ── Section title ────────────────────────────────────────────────────────── */

.eara-dashboard__section-title {
	font-size: 15px;
	font-weight: 700;
	color: #1e3a5f;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.eara-dashboard__section-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #e2e8f0;
}

/* ── Tool cards ───────────────────────────────────────────────────────────── */

.eara-dashboard__tools {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.eara-dashboard__tool {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border: 2px solid #e2e8f0;
	border-radius: 14px;
	padding: 18px 20px;
	text-decoration: none;
	color: inherit;
	transition: transform .15s, box-shadow .15s, border-color .15s;
}

.eara-dashboard__tool:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0,0,0,.08);
	text-decoration: none;
	color: inherit;
}

.eara-dashboard__tool-icon {
	font-size: 32px;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
}

.eara-dashboard__tool-content {
	flex: 1;
}

.eara-dashboard__tool-title {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 4px;
}

.eara-dashboard__tool-desc {
	font-size: 13px;
	color: #64748b;
	line-height: 1.5;
}

.eara-dashboard__tool-arrow {
	font-size: 20px;
	font-weight: 300;
	flex-shrink: 0;
	transition: transform .15s;
}

.eara-dashboard__tool:hover .eara-dashboard__tool-arrow {
	transform: translateX(4px);
}

/* Card colour variants */
.eara-dashboard__tool--primary {
	border-color: #bfdbfe;
}
.eara-dashboard__tool--primary:hover {
	border-color: #93c5fd;
}
.eara-dashboard__tool--primary .eara-dashboard__tool-icon {
	background: #eff6ff;
}
.eara-dashboard__tool--primary .eara-dashboard__tool-title {
	color: #1e40af;
}
.eara-dashboard__tool--primary .eara-dashboard__tool-arrow {
	color: #2563eb;
}

.eara-dashboard__tool--survey {
	border-color: #bbf7d0;
}
.eara-dashboard__tool--survey:hover {
	border-color: #86efac;
}
.eara-dashboard__tool--survey .eara-dashboard__tool-icon {
	background: #f0fdf4;
}
.eara-dashboard__tool--survey .eara-dashboard__tool-title {
	color: #15803d;
}
.eara-dashboard__tool--survey .eara-dashboard__tool-arrow {
	color: #16a34a;
}

.eara-dashboard__tool--update {
	border-color: #fde68a;
}
.eara-dashboard__tool--update:hover {
	border-color: #fcd34d;
}
.eara-dashboard__tool--update .eara-dashboard__tool-icon {
	background: #fffbeb;
}
.eara-dashboard__tool--update .eara-dashboard__tool-title {
	color: #92400e;
}
.eara-dashboard__tool--update .eara-dashboard__tool-arrow {
	color: #d97706;
}

/* ── Recent surveys ───────────────────────────────────────────────────────── */

.eara-dashboard__recent {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	overflow: hidden;
}

.eara-dashboard__recent-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border-bottom: 1px solid #f1f5f9;
}

.eara-dashboard__recent-row:last-child {
	border-bottom: none;
}

.eara-dashboard__recent-icon {
	font-size: 20px;
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	background: #f0fdf4;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.eara-dashboard__recent-info {
	flex: 1;
}

.eara-dashboard__recent-street {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a2e;
	margin-bottom: 2px;
}

.eara-dashboard__recent-meta {
	font-size: 12px;
	color: #64748b;
}

.eara-dashboard__recent-pct {
	font-size: 16px;
	font-weight: 700;
	color: #15803d;
	flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.eara-dashboard__greeting { font-size: 18px; }
	.eara-dashboard__stats {
		grid-template-columns: repeat(2, 1fr);
	}
	.eara-dashboard__stat-num { font-size: 22px; }
	.eara-dashboard__tool { padding: 14px 16px; gap: 12px; }
	.eara-dashboard__tool-icon { width: 44px; height: 44px; font-size: 26px; }
}

@media (max-width: 380px) {
	.eara-dashboard__welcome-inner { flex-direction: column; align-items: flex-start; }
	.eara-dashboard__welcome-badge { display: none; }
}
