/* DemandFlow mobile skeleton — loaded only on phone-class devices (see index.php). */

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
	background: #f4f5f7;
	overscroll-behavior: none;
	-webkit-tap-highlight-color: transparent;
}

#body {
	height: 100%;
}

.mob-shell {
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
}

/* ---- Top bar ---- */
.mob-topbar {
	display: flex;
	align-items: center;
	height: 52px;
	padding-top: env(safe-area-inset-top);
	background: var(--mob-brand-bg, #3041b0);
	color: var(--mob-brand-fg, #ffffff);
	flex-shrink: 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	position: relative;
	z-index: 100;
}

.mob-hamburger,
.mob-topbar-spacer {
	width: 52px;
	height: 52px;
	flex-shrink: 0;
}

.mob-hamburger {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--mob-brand-fg, #ffffff);
	font-size: 20px;
	padding: 0;
	cursor: pointer;
}

.mob-hamburger:active {
	opacity: 0.55;
}

.mob-title {
	flex: 1;
	text-align: center;
	font-size: 17px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---- Content ---- */
.mob-content {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: env(safe-area-inset-bottom);
}

.mob-screen {
	padding: 12px;
}

/* ---- Drawer ---- */
.mob-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 280px;
	max-width: 84vw;
	background: #fff;
	box-shadow: 2px 0 16px rgba(0, 0, 0, 0.25);
	transform: translateX(-100%);
	transition: transform 0.25s ease;
	z-index: 9000;
	display: flex;
	flex-direction: column;
}

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

.mob-drawer-head {
	background: var(--mob-brand-bg, #3041b0);
	color: var(--mob-brand-fg, #ffffff);
	padding: 16px;
	padding-top: calc(16px + env(safe-area-inset-top));
	flex-shrink: 0;
}

.mob-drawer-name {
	font-size: 16px;
	font-weight: 600;
}

.mob-drawer-sub {
	font-size: 12px;
	opacity: 0.7;
	margin-top: 2px;
}

.mob-nav {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.mob-nav-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	font-size: 15px;
	color: #1a1a2e;
	cursor: pointer;
}

.mob-nav-item i {
	width: 20px;
	text-align: center;
	font-size: 17px;
	color: #3041b0;
}

.mob-nav-item:active {
	background: #eef0f8;
}

.mob-nav-item.active {
	background: #eef0f8;
	font-weight: 600;
}

.mob-drawer-foot {
	flex-shrink: 0;
	border-top: 1px solid #e4e6ec;
	padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}

.mob-logout {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 12px 10px;
	background: none;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	color: #c0392b;
	cursor: pointer;
}

.mob-logout i {
	width: 20px;
	text-align: center;
	font-size: 17px;
}

.mob-logout:active {
	background: #f7eceb;
}

/* ---- Scrim ---- */
.mob-scrim {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	z-index: 8999;
}

.mob-scrim.open {
	opacity: 1;
	pointer-events: auto;
}

/* ---- List + cards ---- */
.mob-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mob-card {
	background: #fff;
	border: 1px solid #e4e6ec;
	border-radius: 10px;
	padding: 14px;
}

.mob-card-title {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a2e;
}

.mob-card-meta {
	font-size: 13px;
	color: #8a8f9c;
	margin-top: 4px;
}

/* ---- Empty / placeholder state ---- */
.mob-empty {
	text-align: center;
	padding: 60px 24px;
}

.mob-empty i {
	display: block;
	font-size: 40px;
	margin-bottom: 14px;
	color: #c2c6d2;
}

.mob-empty p {
	margin: 4px 0;
	font-size: 16px;
	color: #5a6072;
}

.mob-empty-sub {
	font-size: 13px;
	color: #9aa0ad;
}

/* ---- Tasks screen ---- */
.mob-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 50px 20px;
	color: #8a8f9c;
	font-size: 14px;
}

.mob-stat-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
}

.mob-stat {
	background: #fff;
	border: 1px solid #e4e6ec;
	border-top: 3px solid #9ca3af;
	border-radius: 10px;
	padding: 10px 12px;
}

.mob-stat-value {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
}

.mob-stat-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #8a8f9c;
	margin-top: 2px;
}

.mob-quickadd {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #e4e6ec;
	border-radius: 10px;
	padding: 0 14px;
	margin-bottom: 10px;
}

.mob-quickadd i {
	color: #9ca3af;
	font-size: 17px;
}

.mob-quickadd input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	font-size: 15px;
	padding: 13px 0;
	color: #1a1a2e;
}

.mob-tasks-tools {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 10px;
}

.mob-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #6b7280;
}

.mob-group {
	margin-bottom: 16px;
}

.mob-group-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 2px;
}

.mob-group-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.mob-group-title {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a2e;
}

.mob-group-count {
	font-size: 12px;
	color: #9ca3af;
}

.mob-task {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	border: 1px solid #e4e6ec;
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 8px;
}

.mob-task:active {
	background: #f7f8fa;
}

.mob-task.done {
	opacity: 0.55;
}

.mob-task-check {
	width: 24px;
	height: 24px;
	border: 2px solid #d1d5db;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 11px;
}

.mob-task-check.checked {
	background: #22c55e;
	border-color: #22c55e;
}

.mob-task-body {
	flex: 1;
	min-width: 0;
}

.mob-task-text {
	font-size: 15px;
	color: #1a1a2e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mob-task.done .mob-task-text {
	text-decoration: line-through;
}

.mob-task-high {
	color: #ef4444;
	font-size: 12px;
}

.mob-task-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 5px;
	font-size: 12px;
}

.mob-task-due {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

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

.mob-task-badge {
	color: #6b7280;
	background: #f1f2f5;
	border-radius: 8px;
	padding: 1px 7px;
	font-size: 11px;
}

.mob-tag {
	background: #eef2ff;
	color: #4f46e5;
	border-radius: 10px;
	padding: 1px 8px;
	font-size: 11px;
	white-space: nowrap;
}

.mob-task-chev {
	color: #c2c6d2;
	font-size: 14px;
	flex-shrink: 0;
}

/* ---- Object editor panel ---- */
.mob-obj-panel {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #f4f5f7;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.mob-obj-panel.open {
	transform: translateX(0);
}

.mob-obj-header {
	display: flex;
	align-items: center;
	height: 52px;
	padding-top: env(safe-area-inset-top);
	background: var(--mob-brand-bg, #3041b0);
	color: var(--mob-brand-fg, #ffffff);
	flex-shrink: 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.mob-obj-back {
	width: 52px;
	height: 52px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: var(--mob-brand-fg, #ffffff);
	font-size: 20px;
	padding: 0;
	cursor: pointer;
}

.mob-obj-back:active {
	opacity: 0.55;
}

.mob-obj-title {
	flex: 1;
	text-align: center;
	font-size: 17px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0 4px;
}

.mob-obj-save {
	flex-shrink: 0;
	min-width: 52px;
	height: 52px;
	background: none;
	border: none;
	color: var(--mob-brand-fg, #ffffff);
	font-size: 15px;
	font-weight: 600;
	padding: 0 14px;
	cursor: pointer;
}

.mob-obj-save:disabled {
	opacity: 0.5;
}

.mob-obj-header-spacer {
	width: 52px;
	flex-shrink: 0;
}

.mob-obj-body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 12px;
	padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.mob-obj-loading {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	color: #c2c6d2;
}

.mob-obj-section {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #8a8f9c;
	margin: 14px 4px 6px;
}

/* ---- Form cards + fields ---- */
.mob-form-card {
	background: #fff;
	border: 1px solid #e4e6ec;
	border-radius: 10px;
	padding: 4px 14px 14px;
	margin-bottom: 12px;
}

.mob-form-card-head {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a2e;
	padding: 12px 0 4px;
	border-bottom: 1px solid #f0f1f4;
	margin-bottom: 6px;
}

.mob-form-unsupported {
	font-size: 13px;
	color: #9aa0ad;
	padding: 10px 0;
	font-style: italic;
}

.mob-field {
	padding: 10px 0;
	border-bottom: 1px solid #f4f5f7;
}

.mob-field:last-child {
	border-bottom: none;
}

.mob-field-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #5a6072;
	margin-bottom: 6px;
}

.mob-field-switchrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.mob-field-switchrow .mob-field-label {
	margin-bottom: 0;
}

.mob-req {
	color: #ef4444;
}

.mob-field-help {
	font-size: 12px;
	color: #9aa0ad;
	margin-top: 5px;
}

.mob-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #d8dae2;
	border-radius: 8px;
	padding: 11px 12px;
	font-size: 15px;
	color: #1a1a2e;
	background: #fff;
	outline: none;
	font-family: inherit;
}

.mob-input:focus {
	border-color: var(--mob-brand-bg, #3041b0);
}

.mob-textarea {
	min-height: 90px;
	resize: vertical;
	line-height: 1.4;
}

/* ---- Toggle switch ---- */
.mob-switch {
	position: relative;
	display: inline-block;
	width: 46px;
	height: 28px;
	flex-shrink: 0;
}

.mob-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.mob-switch-track {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #d1d5db;
	border-radius: 28px;
	transition: background 0.2s;
}

.mob-switch-track::before {
	content: '';
	position: absolute;
	width: 22px;
	height: 22px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s;
}

.mob-switch input:checked + .mob-switch-track {
	background: #22c55e;
}

.mob-switch input:checked + .mob-switch-track::before {
	transform: translateX(18px);
}

/* ---- Checklist field ---- */
.mob-cl-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
}

.mob-cl-check {
	width: 20px;
	height: 20px;
	border: 2px solid #d1d5db;
	border-radius: 5px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 9px;
	cursor: pointer;
}

.mob-cl-check.checked {
	background: #22c55e;
	border-color: #22c55e;
}

.mob-cl-text {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
	color: #1a1a2e;
	font-family: inherit;
}

.mob-cl-del {
	color: #d1d5db;
	font-size: 14px;
	flex-shrink: 0;
	cursor: pointer;
}

.mob-cl-add i {
	width: 20px;
	text-align: center;
	color: #c2c6d2;
	font-size: 12px;
}

/* ---- Tags field ---- */
.mob-tags-editor {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.mob-tag-edit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mob-tag-edit i {
	cursor: pointer;
	font-size: 11px;
}

.mob-tag-input {
	flex: 1;
	min-width: 90px;
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
	color: #1a1a2e;
	padding: 4px 0;
	font-family: inherit;
}

/* ---- Image gallery (imagesEditor) ---- */
.mob-images {
	padding: 4px 0;
}

.mob-img-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.mob-img-cell {
	position: relative;
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f2f5;
}

.mob-img-cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mob-img-del {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	cursor: pointer;
}

.mob-img-add {
	aspect-ratio: 1;
	border: 1.5px dashed #c2c6d2;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	color: #8a8f9c;
	font-size: 12px;
	cursor: pointer;
}

.mob-img-add i {
	font-size: 20px;
}

.mob-img-add.busy {
	opacity: 0.5;
}

/* ---- Network Audit screen ---- */
.mob-audit-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 2px 2px 12px;
}

.mob-audit-head [data-audit-back] {
	font-size: 18px;
	color: var(--mob-brand-bg, #3041b0);
	padding: 4px;
	cursor: pointer;
}

.mob-audit-head-pad {
	width: 4px;
}

.mob-audit-head-label {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a2e;
}

.mob-audit-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mob-audit-row-main {
	flex: 1;
	min-width: 0;
}

.mob-audit-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	white-space: nowrap;
	flex-shrink: 0;
}

.mob-audit-badge.grey {
	background: #f1f2f5;
	color: #8a8f9c;
}

.mob-audit-badge.green {
	background: #e7f7ec;
	color: #1a8a44;
}

.mob-audit-badge.amber {
	background: #fdf1dd;
	color: #b9770e;
}

.mob-audit-badge.red {
	background: #fae9e8;
	color: #c0392b;
}

.mob-pillgroup {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mob-pill {
	border: 1px solid #d8dae2;
	background: #fff;
	color: #5a6072;
	border-radius: 16px;
	padding: 7px 12px;
	font-size: 13px;
	cursor: pointer;
	font-family: inherit;
}

.mob-pill.active {
	background: var(--mob-brand-bg, #3041b0);
	border-color: var(--mob-brand-bg, #3041b0);
	color: var(--mob-brand-fg, #ffffff);
	font-weight: 600;
}

.mob-audit-info {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #f4f5f7;
	font-size: 14px;
}

.mob-audit-info:last-child {
	border-bottom: none;
}

.mob-audit-info span {
	color: #8a8f9c;
}

.mob-audit-info strong {
	color: #1a1a2e;
	font-weight: 600;
	text-align: right;
}

.mob-audit-equip {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f4f5f7;
	cursor: pointer;
}

.mob-audit-equip:last-child {
	border-bottom: none;
}

.mob-audit-equip:active {
	background: #f7f8fa;
}

.mob-audit-u {
	flex-shrink: 0;
	width: 42px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: #5a6072;
	background: #f1f2f5;
	border-radius: 6px;
	padding: 6px 0;
}

.mob-audit-equip-main {
	flex: 1;
	min-width: 0;
}

.mob-audit-done {
	color: #22c55e;
	font-size: 14px;
	flex-shrink: 0;
}
