/* Engineer Login & Work Report: uses the site's existing brand tokens. */
.dxp-eng { padding-top: 32px; }
.dxe-login { max-width: 520px; margin: 0 auto; }
.dxe-login .dxp-panel { padding: 34px; }
.dxp-eng .dxp-auth-form label { display: block; font-weight: 700; color: var(--i); margin-bottom: 4px; }
.dxp-eng .dxp-auth-form input[type=text], .dxp-eng .dxp-auth-form input[type=password] { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-size: 16px; border: 1.5px solid var(--ln); border-radius: 10px; }
.dxp-eng .dxp-auth-form input:focus { outline: none; border-color: var(--b); }
.dxp-eng .dxp-auth-form .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.dxp-eng .dxp-auth-form #wp-submit { width: 100%; padding: 14px; border: 0; border-radius: 999px; background: var(--b); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; }
.dxp-eng .dxp-auth-form #wp-submit:hover { background: var(--i); }

/* Top bar */
.dxe-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: var(--i); color: #d9e1f5; border-radius: 18px; padding: 14px 18px; margin-bottom: 22px; }
.dxe-who { display: flex; gap: 12px; align-items: center; }
.dxe-who strong { display: block; color: #fff; }
.dxe-who small { color: #aab6d8; }
.dxe-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.dxe-nav a { color: #d9e1f5 !important; text-decoration: none; padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem; }
.dxe-nav a:hover { background: rgba(255,255,255,.1); }
.dxe-nav a[aria-current="page"] { background: #fff; color: var(--i) !important; }

/* Dashboard cards */
.dxe-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-bottom: 18px; }
.dxe-card { background: #fff; border: 1px solid var(--ln); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.dxe-card span { display: block; font-size: .8rem; font-weight: 700; color: var(--m); margin-bottom: 4px; }
.dxe-card strong { display: flex; align-items: center; gap: 8px; color: var(--i); font-size: 1.02rem; overflow-wrap: anywhere; }
.dxe-dot { width: 10px; height: 10px; border-radius: 50%; background: #b8c0d4; flex: none; }
.dxe-dot.is-on { background: var(--s); box-shadow: 0 0 0 4px rgba(240,138,28,.2); }
.dxe-dot.is-done { background: #2d7d4f; }
.dxe-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px !important; }

/* Steps */
.dxe-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0; margin: 0 0 18px; counter-reset: s; }
.dxe-steps li { counter-increment: s; text-align: center; font-size: .8rem; font-weight: 700; color: var(--m); padding: 8px 4px; border-radius: 10px; background: var(--cl); border: 1px solid var(--ln); }
.dxe-steps li::before { content: counter(s) ". "; }
.dxe-steps li.is-done { background: #e8f5ee; border-color: #b8dfc4; color: #1f5d34; }
.dxe-steps li.is-now { background: #fff3e4; border-color: #f6d3a5; color: #7a4708; }

/* Sections */
.dxe-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.dxe-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--b); color: #fff; font-size: .9rem; flex: none; }
.dxe-req { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--s); text-transform: uppercase; letter-spacing: .04em; }
.dxe-label { display: block; font-weight: 700; color: var(--i); font-size: .92rem; margin: 6px 0 8px; }
.dxp-eng input[readonly] { background: var(--cl); color: var(--i); }

/* GPS + map */
.dxe-gps { border: 1.5px dashed var(--ln); border-radius: 14px; padding: 14px; margin: 6px 0 16px; }
.dxe-gps-status { font-size: .9rem; color: var(--m); margin: 0 0 10px !important; }
.dxe-map { border-radius: 12px; overflow: hidden; background: var(--cl); min-height: 180px; display: flex; align-items: center; justify-content: center; color: var(--m); font-size: .88rem; text-align: center; }
.dxe-map iframe { width: 100%; height: 220px; border: 0; display: block; }

/* Photos */
.dxe-photo { border: 1.5px dashed var(--ln); border-radius: 14px; padding: 14px; margin: 6px 0 12px; }
.dxe-preview { border-radius: 12px; background: var(--cl); min-height: 140px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--m); font-size: .88rem; margin-bottom: 10px; }
.dxe-preview img { width: 100%; max-height: 320px; object-fit: contain; display: block; background: #000; }
.dxe-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.dxe-photo-btns label { margin: 0 !important; cursor: pointer; }

/* Validation */
.dxp-eng .is-missing { border-color: #b23b3b !important; }
.dxe-photo.is-missing, .dxe-gps.is-missing { background: #fdf3f3; }
.dxe-errors { background: #fbeeee; border: 1px solid #efc1c1; color: #8a2424; border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; }
.dxe-errors ul { margin: 8px 0 0; padding-left: 20px; }
.dxe-form.is-busy { opacity: .7; pointer-events: none; }

/* Actions */
.dxe-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; background: #fff; border: 1px solid var(--ln); border-radius: 16px; padding: 14px; }
.dxe-actions .dxp-button { font-size: 1rem; }

/* Success + detail */
.dxe-success { text-align: center; background: #edf7f0; border: 1px solid #b8dfc4; border-radius: 18px; padding: 30px 20px; margin-bottom: 22px; }
.dxe-success h1 { color: #1f5d34 !important; font-size: clamp(1.4rem, 4vw, 1.9rem) !important; margin: 8px 0 !important; }
.dxe-tick { display: inline-block; width: 56px; height: 56px; border-radius: 50%; background: #2d7d4f; position: relative; }
.dxe-tick::after { content: ""; position: absolute; left: 19px; top: 14px; width: 14px; height: 24px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.dxe-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 10px; margin: 10px 0 18px; }
.dxe-dl div { background: var(--cl); border-radius: 12px; padding: 10px 14px; }
.dxe-dl dt { font-size: .78rem; font-weight: 700; color: var(--m); }
.dxe-dl dd { margin: 2px 0 0; font-weight: 700; color: var(--i); overflow-wrap: anywhere; }
.dxe-text { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 4px 24px; }
.dxe-text h3 { font-size: .9rem !important; color: var(--m) !important; margin: 10px 0 2px !important; }
.dxe-text p { margin: 0 0 6px !important; }
.dxe-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; margin: 14px 0; }
.dxe-maps figure, .dxe-gallery figure { margin: 0; }
.dxe-maps iframe { width: 100%; height: 220px; border: 0; border-radius: 12px; display: block; }
.dxe-maps figcaption, .dxe-gallery figcaption { font-size: .82rem; font-weight: 700; color: var(--m); margin-top: 6px; }
.dxe-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.dxe-gallery a, .dxe-gallery span { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--cl); color: var(--m); font-size: .85rem; }
.dxe-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Filters + history table */
.dxe-filter { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.dxe-filter label { margin: 0 !important; font-weight: 700; color: var(--i); font-size: .88rem; }
.dxe-filter input, .dxe-filter select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; font-size: 16px; border: 1.5px solid var(--ln); border-radius: 10px; background: #fff; }
.dxe-filter-btns { display: flex; gap: 6px; }
.dxe-tablewrap { overflow-x: auto; }

/* Admin panel reuse */
.dxe-admin { width: 100% !important; padding: 0 !important; margin: 0 !important; max-width: none !important; }

/* Phones */
@media (max-width: 760px) {
	.dxp-eng { padding-top: 16px; }
	.dxe-bar { border-radius: 14px; padding: 12px; }
	.dxe-nav { width: 100%; }
	.dxe-nav a { flex: 1 1 auto; text-align: center; padding: 9px 8px; font-size: .86rem; }
	.dxe-steps { grid-template-columns: repeat(2, 1fr); }
	.dxe-filter { grid-template-columns: 1fr 1fr; }
	.dxe-filter label:first-child { grid-column: 1 / -1; }
	.dxe-filter-btns { grid-column: 1 / -1; }
	.dxe-filter-btns .dxp-button { flex: 1; text-align: center; }
	.dxe-actions { position: sticky; bottom: 0; z-index: 20; border-radius: 16px 16px 0 0; margin: 0 -4px; box-shadow: 0 -6px 20px rgba(20,39,92,.12); justify-content: stretch; }
	.dxe-actions .dxp-button { flex: 1 1 30%; text-align: center; padding: 13px 8px; font-size: .92rem; }
	.dxe-photo-btns label { flex: 1; text-align: center; padding: 12px 8px; }
	.dxe-map iframe, .dxe-maps iframe { height: 190px; }
	/* History table becomes cards */
	.dxe-table thead { display: none; }
	.dxe-table, .dxe-table tbody, .dxe-table tr, .dxe-table td { display: block; width: 100%; }
	.dxe-table tr { border: 1px solid var(--ln); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
	.dxe-table td { border: 0 !important; padding: 4px 0 !important; display: flex; justify-content: space-between; gap: 12px; }
	.dxe-table td[data-label]::before { content: attr(data-label); font-weight: 700; color: var(--m); font-size: .82rem; }
	.dxe-table td:last-child { padding-top: 8px !important; }
	.dxe-table td:last-child .dxp-button { width: 100%; text-align: center; }
}
