/* KPT Repair CRM — Public Tracking Portal Design System CSS */

.kpt-public-portal {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	color: #0f172a;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid rgba(226, 232, 240, 0.8);
	border-radius: 16px;
	padding: 30px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
	margin: 20px auto;
	max-width: 800px;
	box-sizing: border-box;
}

.kpt-public-portal * {
	box-sizing: border-box;
}

/* Header */
.portal-header {
	text-align: center;
	margin-bottom: 25px;
}

.portal-header h2 {
	font-family: 'Outfit', sans-serif;
	font-weight: 800;
	font-size: 24px;
	margin: 0 0 8px 0;
	color: #0f172a;
}

.portal-header .subtitle {
	font-size: 14px;
	color: #64748b;
	margin: 0;
}

/* Tracking Input Form */
.portal-form {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 30px;
}

.portal-form-row {
	display: flex;
	gap: 15px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.portal-form-group {
	flex: 1;
	min-width: 220px;
}

.portal-form-group label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	margin-bottom: 8px;
	letter-spacing: 0.5px;
}

.portal-form-group input {
	width: 100% !important;
	padding: 11px 14px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	background: #ffffff !important;
	color: #0f172a !important;
}

.portal-form-group input:focus {
	border-color: #1066e5 !important;
	box-shadow: 0 0 0 3px rgba(16, 102, 229, 0.15) !important;
	outline: none !important;
}

.portal-btn-group {
	flex: 0 0 160px;
}

.btn {
	font-weight: 600;
	padding: 12px 20px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	transition: all 0.25s ease;
	text-decoration: none;
}

.btn-primary {
	background: #1066e5;
	color: #ffffff;
}

.btn-primary:hover {
	background: #0d54c0;
}

.btn-glow {
	box-shadow: 0 4px 12px rgba(16, 102, 229, 0.15);
}

.btn-full {
	width: 100%;
}

.error-banner {
	background: #fef2f2;
	border: 1px solid #fee2e2;
	color: #b91c1c;
	padding: 10px 15px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	margin-top: 15px;
	text-align: center;
}

.hidden {
	display: none !important;
}

/* Results section */
.portal-results-wrapper {
	animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.results-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.device-header-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	flex-wrap: wrap;
}

.device-summary {
	display: flex;
	align-items: center;
	gap: 15px;
}

.device-avatar {
	font-size: 28px;
	width: 48px;
	height: 48px;
	background: rgba(16, 102, 229, 0.08);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.device-details h3 {
	margin: 0;
	font-family: 'Outfit', sans-serif;
	font-size: 18px;
	font-weight: 700;
}

.job-tag-badge {
	margin: 4px 0 0 0;
	font-size: 11px;
	color: #64748b;
}

.device-status-box {
	text-align: right;
}

.status-badge-lbl {
	display: block;
	font-size: 9px;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.status-badge {
	font-size: 12px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 50px;
	background: rgba(16, 102, 229, 0.08);
	color: #1066e5;
	display: inline-block;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Col grids */
.portal-stats-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.col-card {
	margin-bottom: 0;
}

.col-card h4 {
	margin: 0 0 15px 0;
	font-family: 'Outfit', sans-serif;
	font-size: 14px;
	font-weight: 700;
	border-bottom: 1px dashed #cbd5e1;
	padding-bottom: 8px;
}

.checklist-items {
	list-style: none;
	padding: 0;
	margin: 0 0 15px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.checklist-items li {
	font-size: 11px;
	font-weight: 600;
	background: #f1f5f9;
	padding: 4px 10px;
	border-radius: 50px;
	color: #475569;
	border: 1px solid #e2e8f0;
}

.dispute-disclaimer {
	font-size: 10px;
	color: #94a3b8;
	margin: 0;
	line-height: 1.3;
}

.cost-summary-box {
	background: rgba(16, 185, 129, 0.06);
	border: 1px dashed rgba(16, 185, 129, 0.3);
	border-radius: 8px;
	padding: 12px 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.cost-lbl {
	font-size: 11px;
	font-weight: 700;
	color: #475569;
}

.cost-val {
	font-family: 'Outfit', sans-serif;
	font-size: 16px;
	font-weight: 800;
	color: #059669;
}

.problem-desc-text {
	font-size: 12px;
	line-height: 1.4;
	color: #475569;
	margin: 5px 0 0 0;
}

/* Vertical timeline */
.timeline-card h4 {
	margin: 0 0 20px 0;
	font-family: 'Outfit', sans-serif;
	font-size: 14px;
	font-weight: 700;
}

.portal-vertical-timeline {
	position: relative;
	padding-left: 25px;
	border-left: 2px solid #cbd5e1;
	margin-left: 10px;
}

.timeline-node {
	position: relative;
	margin-bottom: 20px;
	padding-bottom: 5px;
}

.timeline-node:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
}

.timeline-node::before {
	content: '';
	position: absolute;
	left: -31px;
	top: 4px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #94a3b8;
	border: 2px solid #ffffff;
	box-shadow: 0 0 0 2px #cbd5e1;
	transition: all 0.3s ease;
}

.timeline-node.active::before {
	background: #1066e5;
	box-shadow: 0 0 0 2px rgba(16, 102, 229, 0.3);
	transform: scale(1.2);
}

.node-meta {
	font-size: 10px;
	font-weight: 700;
	color: #64748b;
}

.node-title {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	margin-top: 2px;
}

.node-desc {
	font-size: 12px;
	color: #475569;
	margin-top: 4px;
	line-height: 1.3;
}

/* Mobile responsive */
@media (max-width: 640px) {
	.portal-form-row {
		flex-direction: column;
		align-items: stretch;
	}
	
	.portal-btn-group {
		flex: none;
	}
	
	.portal-stats-row {
		grid-template-columns: 1fr;
	}
	
	.device-header-card {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.device-status-box {
		text-align: left;
	}
}
