/* KPT Repair CRM — Standalone PWA Design System CSS (Theme Bypassed iOS/Android Dark Style) */

/* 1. STRICT BODY RESOLUTION OVERRIDES */
body.kpt-pwa-body {
	background: #0b0f19 !important;
	color: #f1f5f9 !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow-x: hidden !important;
	min-height: 100vh !important;
}

body.kpt-pwa-body * {
	box-sizing: border-box !important;
}

/* Scrollbars */
body.kpt-pwa-body ::-webkit-scrollbar {
	width: 5px;
	height: 5px;
}
body.kpt-pwa-body ::-webkit-scrollbar-track {
	background: #0b0f19;
}
body.kpt-pwa-body ::-webkit-scrollbar-thumb {
	background: #374151;
	border-radius: 50px;
}
body.kpt-pwa-body ::-webkit-scrollbar-thumb:hover {
	background: #06b6d4;
}

/* Hide admin bar if still rendered */
#wpadminbar {
	display: none !important;
}
html {
	margin-top: 0 !important;
}

/* 2. DYNAMIC APP SHELL PANEL */
.kpt-employee-portal.responsive-app-shell {
	background: #0b0f19 !important;
	color: #f1f5f9 !important;
	padding: 15px 15px 90px 15px !important; /* bottom padding isolates fixed bottom nav bar! */
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	box-sizing: border-box;
	min-height: 100vh !important;
	position: relative;
}

/* Responsive visibility rules */
.desktop-only { display: flex !important; }
.mobile-only { display: none !important; }

/* 3. APP HEADERS (Theme-decoupled minimalist view) */
.ep-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding-bottom: 15px;
	margin-bottom: 20px;
}

.ep-logo {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ep-logo h2 {
	font-family: 'Outfit', sans-serif;
	font-weight: 900;
	font-size: 15px;
	margin: 0;
	letter-spacing: 0.5px;
	color: #ffffff;
}

.ep-logo .logo-icon {
	color: #06b6d4;
	font-size: 20px;
}

.badge {
	font-size: 8px;
	font-weight: 800;
	background: #06b6d4;
	color: #0b0f19;
	padding: 2px 6px;
	border-radius: 50px;
}

.ep-nav-tabs {
	display: flex;
	background: #111827;
	padding: 4px;
	border-radius: 50px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
	border: none;
	background: none;
	cursor: pointer;
	padding: 8px 16px;
	border-radius: 50px;
	font-size: 11px;
	font-weight: 700;
	color: #9ca3af;
	transition: all 0.2s ease;
}

.tab-btn:hover {
	color: #ffffff;
}

.tab-btn.active {
	background: #1e293b;
	color: #06b6d4;
	box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.ep-profile {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 11px;
}

.username {
	font-weight: 700;
	color: #ffffff;
}

.btn-logout {
	color: #f43f5e;
	text-decoration: none;
	font-weight: 700;
}

.dot-live {
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

.pulse-green { background: #10b981; box-shadow: 0 0 6px #10b981; animation: live-pulse-pwa 2s infinite; }

@keyframes live-pulse-pwa {
	0% { transform: scale(0.95); opacity: 0.5; }
	50% { transform: scale(1.1); opacity: 1; }
	100% { transform: scale(0.95); opacity: 0.5; }
}

/* 4. DYNAMIC KPI COUNTERS */
.ep-kpi-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 15px;
	margin-bottom: 20px;
}

.ep-kpi-card {
	background: #111827;
	border: 1px solid rgba(255, 255, 255, 0.06);
	padding: 15px;
	border-radius: 12px;
	text-align: center;
}

.ep-kpi-card .lbl {
	display: block;
	font-size: 8px;
	font-weight: 800;
	color: #9ca3af;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ep-kpi-card h3 {
	font-family: 'Outfit', sans-serif;
	margin: 5px 0 0 0;
	font-size: 22px;
	font-weight: 900;
	color: #ffffff;
}

/* 5. APP SHELL PANES */
.ep-content-area {
	margin-bottom: 10px;
}

.ep-tab-pane {
	display: none;
	animation: appPaneSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-tab-pane.active {
	display: block;
}

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

.ep-section-header {
	margin-bottom: 15px;
}

.ep-section-header h3 {
	font-family: 'Outfit', sans-serif;
	font-weight: 900;
	font-size: 16px;
	margin: 0;
	color: #ffffff;
}

.section-desc {
	font-size: 11px;
	color: #9ca3af;
	margin: 4px 0 0 0;
}

.sync-tag {
	font-size: 9px;
	color: #10b981;
	font-weight: 700;
}

/* Glassmorphic Cards */
.recent-repairs-card {
	background: #111827 !important;
	border: 1px solid rgba(255, 255, 255, 0.06) !important;
	border-radius: 12px;
	padding: 20px;
}

/* 6. MINIMALIST LOW FRICTION FORMS */
.ep-form {
	background: #111827;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 12px;
	padding: 20px;
}

.ep-form-section {
	margin-bottom: 20px;
	border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
	padding-bottom: 15px;
}

.ep-form-section:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.ep-form-section h4 {
	font-family: 'Outfit', sans-serif;
	margin: 0 0 12px 0;
	font-size: 13px;
	color: #06b6d4;
	font-weight: 800;
}

.ep-form-group {
	margin-bottom: 12px;
}

.ep-form-group label {
	display: block;
	font-size: 9px;
	font-weight: 800;
	color: #9ca3af;
	text-transform: uppercase;
	margin-bottom: 6px;
	letter-spacing: 0.5px;
}

.ep-form-group input, .ep-form-group select, .ep-form-group textarea {
	width: 100% !important;
	padding: 9px 12px !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	border-radius: 8px !important;
	font-size: 13px !important;
	background: #0f172a !important;
	color: #ffffff !important;
}

.ep-form-group input:focus, .ep-form-group select:focus, .ep-form-group textarea:focus {
	border-color: #06b6d4 !important;
	box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2) !important;
	outline: none !important;
}

.ep-form-row {
	display: flex;
	gap: 12px;
}

.col-6 { width: 50%; }
.col-12 { width: 100%; }

.ep-type-selector, .ep-accessories-checks, .ep-issue-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.type-radio input, .acc-chk input, .tag-checkbox input {
	display: none;
}

.type-radio span, .acc-chk span, .tag-checkbox span {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 50px;
	background: #1f2937;
	border: 1px solid rgba(255, 255, 255, 0.05);
	font-size: 11px;
	font-weight: 700;
	color: #9ca3af;
	cursor: pointer;
	transition: all 0.2s ease;
}

.type-radio input:checked + span { background: rgba(6, 182, 212, 0.12); border-color: #06b6d4; color: #06b6d4; }
.acc-chk input:checked + span { background: rgba(16, 185, 129, 0.12); border-color: #10b981; color: #10b981; }
.tag-checkbox input:checked + span { background: rgba(244, 63, 94, 0.12); border-color: #f43f5e; color: #f43f5e; }

/* Minimalist Camera Upload Pads (Exactly 2 Optional Slots) */
.minimalist-camera-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	max-width: 420px;
	margin: 0 auto;
}

.camera-upload-card {
	background: #0f172a;
	border: 2px dashed rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cam-label {
	display: block;
	font-size: 8px;
	font-weight: 800;
	color: #9ca3af;
	text-align: center;
}

.cam-box-wrapper {
	position: relative;
	height: 90px;
	border-radius: 6px;
	background: #1f2937;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	cursor: pointer;
}

.cam-box-wrapper input {
	display: none;
}

.cam-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: #9ca3af;
	cursor: pointer;
}

.cam-placeholder .cam-icon {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

.cam-placeholder span {
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 0.5px;
}

.cam-preview {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	z-index: 2;
}

/* Green Pulsing submit Button */
.btn-green {
	background: var(--ep-green) !important;
	color: #0b0f19 !important;
	font-weight: 800 !important;
}

.btn-green:hover {
	background: #059669 !important;
}

.btn-glow {
	box-shadow: 0 4px 14px var(--ep-green-glow);
}

.btn-glow:hover {
	box-shadow: 0 6px 20px var(--ep-green-glow);
	transform: translateY(-1px);
}

/* 7. DENSE KANBAN COLUMNS */
.ep-kanban-scroll {
	display: flex;
	gap: 15px;
	overflow-x: auto;
	padding-bottom: 10px;
}

.kanban-col {
	flex: 0 0 280px;
	background: #111827;
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 480px;
}

.kanban-col h4 {
	margin: 0;
	font-family: 'Outfit', sans-serif;
	font-size: 12px;
	font-weight: 800;
	color: #ffffff;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.kanban-col h4 .col-cnt {
	background: #1f2937;
	color: var(--ep-primary);
	padding: 1px 5px;
	font-size: 9px;
	border-radius: 50px;
}

.kanban-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.kanban-card {
	background: #1f2937;
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 8px;
	padding: 10px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	cursor: pointer;
	transition: all 0.2s ease;
}

.kanban-card:hover {
	transform: translateY(-1px);
	background: #2d3748;
	border-color: var(--ep-primary);
}

.card-title {
	font-weight: 800;
	font-size: 11px;
	color: #06b6d4;
	margin-bottom: 4px;
}

.card-device {
	font-size: 10px;
	font-weight: 600;
	color: #9ca3af;
	margin-bottom: 4px;
}

.card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 9px;
	color: #6b7280;
}

/* 8. PWA TABLES SYSTEMS */
.ep-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
	text-align: left;
}

.ep-table th {
	padding: 10px 12px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.08);
	color: #9ca3af;
	font-weight: 700;
}

.ep-table td {
	padding: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	vertical-align: middle;
	color: #f1f5f9;
}

.ep-table tr:last-child td {
	border-bottom: none;
}

.ep-filter-strip {
	display: flex;
	gap: 10px;
	margin-bottom: 15px;
	background: #111827;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.06);
}

.ep-filter-strip input {
	flex: 1;
	padding: 8px 12px !important;
	border-radius: 6px !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	font-size: 12px !important;
	background: #0f172a !important;
	color: #ffffff !important;
}

.ep-filter-strip select {
	flex: 0 0 140px;
	padding: 8px 12px !important;
	border-radius: 6px !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	font-size: 12px !important;
	background: #0f172a !important;
	color: #ffffff !important;
}

/* Status tag colors */
.badge-priority {
	font-size: 8px;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 50px;
	text-transform: uppercase;
}

.badge-normal { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.badge-urgent { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.badge-critical { background: rgba(244, 63, 94, 0.15); color: #f43f5e; animation: pwa-crit-blink 1.5s infinite; }

@keyframes pwa-crit-blink {
	0% { opacity: 0.6; }
	50% { opacity: 1; }
	100% { opacity: 0.6; }
}

.status-tag {
	font-size: 9px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 50px;
	background: #374151;
	color: #d1d5db;
}

.status-received { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.status-diagnosing { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.status-testing { background: rgba(217, 70, 239, 0.1); color: #d946ef; }
.status-ready { background: rgba(16, 185, 129, 0.1); color: #10b981; }

/* Buttons global PWA resets */
.btn {
	font-family: var(--ep-sans);
	font-weight: 700;
	padding: 8px 14px;
	border-radius: 50px;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
}

.btn-primary { background: #06b6d4; color: #0b0f19; }
.btn-dark { background: #1f2937; color: #ffffff; }
.btn-full { width: 100%; justify-content: center; }

/* 9. OPERATIONS DUAL DRAWERS */
.ep-drawer-wrapper {
	position: fixed;
	top: 0;
	right: 0;
	width: 100vw;
	height: 100vh;
	z-index: 99999;
	visibility: hidden;
	transition: visibility 0.4s;
}

.ep-drawer-wrapper.open {
	visibility: visible;
}

.drawer-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(11, 15, 25, 0.5);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.4s ease;
}

.ep-drawer-wrapper.open .drawer-overlay {
	opacity: 1;
}

.ep-drawer {
	position: absolute;
	top: 0;
	right: 0;
	width: 420px;
	height: 100%;
	background: #111827;
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: -15px 0 45px rgba(0,0,0,0.3);
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	display: flex;
	flex-direction: column;
	padding: 0;
}

.ep-drawer-wrapper.open .ep-drawer {
	transform: translateX(0);
}

.drawer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 20px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-header h3 {
	margin: 0;
	font-family: var(--ep-display);
	font-weight: 800;
	font-size: 15px;
	color: #ffffff;
}

.drawer-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #9c23af; /* iOS look close color */
}

.drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	color: #d1d5db;
}

/* 10. HIGH FIDELITY MOBILE REDESIGNS (Mobile Smartphone Viewports max 768px) */
@media (max-width: 768px) {
	.desktop-only { display: none !important; }
	.mobile-only { display: block !important; }
	
	/* Standalone app container padding adjustments */
	.kpt-employee-portal.responsive-app-shell {
		padding: 10px 10px 85px 10px !important;
		min-height: 100vh !important;
	}
	
	/* iOS style Mobile Header */
	.ep-mobile-header {
		display: flex !important;
		justify-content: space-between;
		align-items: center;
		padding: 5px 0 10px 0 !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
		margin-bottom: 15px !important;
		height: 44px !important;
	}
	
	.ep-logo-mobile {
		display: flex;
		align-items: center;
		gap: 6px;
	}
	
	.ep-logo-mobile h3 {
		font-family: var(--ep-display);
		font-size: 14px;
		font-weight: 900;
		margin: 0;
		letter-spacing: 0.5px;
		color: #ffffff;
	}
	
	.ep-logo-mobile .logo-icon {
		color: #06b6d4;
		font-size: 16px;
		width: 16px;
		height: 16px;
	}
	
	.ep-user-badge {
		display: flex;
		align-items: center;
		gap: 6px;
		font-size: 10px;
	}
	
	.username-badge {
		font-weight: 700;
		color: #9ca3af;
	}
	
	.btn-logout-pwa {
		color: #f43f5e;
		text-decoration: none;
		font-weight: 800;
	}
	
	/* Premium Home grid Shortcuts */
	.mobile-action-grid {
		display: grid !important;
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 8px !important;
		margin-bottom: 20px !important;
	}
	
	.action-menu-card {
		background: #111827 !important;
		border: 1px solid rgba(255, 255, 255, 0.06) !important;
		border-radius: var(--ep-radius-md) !important;
		padding: 12px 6px !important;
		text-align: center;
		cursor: pointer;
		display: flex;
		flex-direction: column;
		align-items: center;
		transition: transform 0.15s ease;
	}
	
	.action-menu-card:active {
		transform: scale(0.96);
		background: #1e293b !important;
	}
	
	.action-icon {
		font-size: 18px !important;
		margin-bottom: 4px !important;
	}
	
	.action-menu-card strong {
		display: block;
		font-family: var(--ep-display);
		font-size: 10px !important;
		font-weight: 900 !important;
		color: #ffffff !important;
		margin-bottom: 2px;
	}
	
	.action-desc {
		display: block;
		font-size: 6px !important;
		font-weight: 700 !important;
		color: #9ca3af !important;
	}
	
	/* Mobile KPI Row compact tags */
	.ep-kpi-row {
		grid-template-columns: repeat(4, 1fr) !important;
		gap: 6px !important;
		margin-bottom: 15px !important;
	}
	
	.ep-kpi-card {
		padding: 8px 4px !important;
		border-radius: 8px !important;
	}
	
	.ep-kpi-card .lbl {
		font-size: 6px !important;
	}
	
	.ep-kpi-card h3 {
		font-size: 14px !important;
		margin-top: 1px !important;
	}
	
	/* Floating PWA Bottom Navigation bar */
	.ep-bottom-nav {
		display: flex !important;
		position: fixed !important;
		bottom: 12px !important;
		left: 12px !important;
		right: 12px !important;
		height: 56px !important;
		background: rgba(15, 23, 42, 0.95) !important;
		backdrop-filter: blur(15px) !important;
		-webkit-backdrop-filter: blur(15px) !important;
		border: 1px solid rgba(255, 255, 255, 0.08) !important;
		border-radius: 50px !important;
		z-index: 9999 !important;
		padding: 0 8px !important;
		justify-content: space-around !important;
		align-items: center !important;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
	}
	
	.nav-btn {
		background: none !important;
		border: none !important;
		cursor: pointer !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 2px !important;
		color: #64748b !important;
		padding: 4px 10px !important;
		border-radius: 50px !important;
		transition: all 0.2s ease !important;
	}
	
	.nav-icon {
		font-size: 16px !important;
	}
	
	.nav-lbl {
		font-size: 8px !important;
		font-weight: 800 !important;
		text-transform: uppercase !important;
		letter-spacing: 0.5px !important;
	}
	
	.nav-btn.active {
		color: #ffffff !important;
		text-shadow: 0 0 6px rgba(255,255,255,0.4) !important;
	}
	
	/* Mobile Status Switcher Bar (Eliminates horizontal scrolling!) */
	.mc-status-swapper-bar {
		display: flex !important;
		gap: 6px !important;
		overflow-x: auto !important;
		padding-bottom: 10px !important;
		margin-bottom: 15px !important;
		border-bottom: 1px dashed rgba(255, 255, 255, 0.08) !important;
	}
	
	.mc-status-swapper-bar::-webkit-scrollbar {
		display: none !important;
	}
	
	.status-pill {
		border: 1px solid rgba(255, 255, 255, 0.06) !important;
		background: #111827 !important;
		color: #9ca3af !important;
		padding: 5px 10px !important;
		border-radius: 50px !important;
		font-size: 10px !important;
		font-weight: 700 !important;
		cursor: pointer !important;
		white-space: nowrap !important;
		display: flex !important;
		align-items: center !important;
		gap: 5px !important;
		transition: all 0.2s ease !important;
	}
	
	.status-pill.active {
		background: rgba(6, 182, 212, 0.12) !important;
		color: #06b6d4 !important;
		border-color: #06b6d4 !important;
	}
	
	.status-pill .pill-cnt {
		font-size: 8px !important;
		background: rgba(255, 255, 255, 0.08) !important;
		padding: 1px 4px !important;
		border-radius: 50px !important;
		color: #9ca3af !important;
	}
	
	.status-pill.active .pill-cnt {
		background: #06b6d4 !important;
		color: #0b0f19 !important;
		font-weight: 800 !important;
	}
	
	/* Mobile Kanban board transforms to single column stack based on active status */
	.ep-kanban-scroll {
		display: block !important;
		padding-bottom: 0 !important;
	}
	
	.kanban-col {
		width: 100% !important;
		flex: none !important;
		min-height: auto !important;
		background: transparent !important;
		border: none !important;
		padding: 0 !important;
		display: none !important;
	}
	
	.kanban-col.mobile-active-col {
		display: flex !important;
	}
	
	.kanban-col h4 {
		display: none !important;
	}
	
	/* Forms mobile responsive resets */
	.ep-form {
		padding: 12px !important;
	}
	
	.ep-form-row {
		flex-direction: column !important;
		gap: 0 !important;
	}
	
	.col-6 {
		width: 100% !important;
	}
	
	.ep-filter-strip {
		flex-direction: column !important;
		gap: 8px !important;
		padding: 8px !important;
	}
	
	.ep-filter-strip select {
		flex: none !important;
		width: 100% !important;
	}
	
	.minimalist-camera-grid {
		grid-template-columns: 1fr 1fr !important;
		gap: 10px !important;
	}
	
	.ep-drawer {
		width: 100% !important;
	}
}
