/* Speed Track ERP — design layer (v4.8).
   Loaded last inside the app: one calm, modern look over every screen.
   Light sidebar, line icons, soft surfaces, clear type. */

:root {
	--bg: #f5f6fa;
	--surface: #ffffff;
	--surface-2: #f8f9fc;
	--surface-3: #f1f3f8;
	--line: #e6e9f0;
	--line-2: #eff1f6;
	--ink: #0e1726;
	--ink-2: #344054;
	--muted: #667085;
	--muted-2: #98a2b3;
	--brand: #1f4fd1;
	--brand2: #1a43b3;
	--brand-ink: #173c9e;
	--brand-soft: #eef3ff;
	--brand-line: #d4e0ff;
	--ok: #0e9f6e;
	--ok-soft: #ecfdf5;
	--warn: #d97706;
	--warn-soft: #fff7ed;
	--bad: #dc2626;
	--bad-soft: #fef2f2;
	--r-sm: 8px;
	--r: 12px;
	--r-lg: 16px;
	--sh-xs: 0 1px 2px rgba(16, 24, 40, .05);
	--sh-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
	--sh-md: 0 2px 4px -2px rgba(16, 24, 40, .06), 0 10px 24px -8px rgba(16, 24, 40, .12);
	--sh-lg: 0 12px 32px -6px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .06);
	--side-w: 264px;
	--card-shadow: var(--sh-sm);
}

body.stl-erp { background: var(--bg); color: var(--ink); font-size: 14px; letter-spacing: -.003em; }
.stl-erp a { color: var(--brand); }
.stl-erp ::selection { background: #dbe6ff; }
.ico { flex: 0 0 auto; display: inline-block; vertical-align: middle; }

/* ================================ Sidebar ================================ */
.erp-side {
	background: var(--surface);
	color: var(--ink-2);
	border-right: 1px solid var(--line);
	box-shadow: none;
	width: var(--side-w);
}
.erp-brand { padding: 18px 18px 14px; border-bottom: 0; gap: 12px; }
.erp-logo { width: 42px; height: 46px; border-radius: 12px; padding: 3px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--sh-xs); }
.erp-brand div strong { color: var(--ink); font-size: 14.5px; font-weight: 650; font-weight: 600; letter-spacing: -.01em; }
.erp-brand div span { color: var(--muted); font-size: 12px; }

.erp-search { margin: 2px 14px 6px; }
.stl-erp .erp-side .erp-search input[type=search] {
	background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
	min-height: 38px; border-radius: 10px; font-size: 13.5px; padding-left: 34px;
}
.stl-erp .erp-side .erp-search input[type=search]::placeholder { color: var(--muted-2); }
.stl-erp .erp-side .erp-search input[type=search]:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 79, 209, .12); }
.erp-search span { opacity: 1; color: var(--muted-2); display: inline-flex; left: 11px; }

.erp-nav { padding: 4px 12px 16px; }
.stl-erp .erp-nav .erp-gl {
	color: var(--muted-2); font-size: 11px; font-weight: 600; letter-spacing: .08em;
	margin: 18px 8px 6px; width: calc(100% - 16px);
}
.stl-erp .erp-nav .erp-gl:hover { color: var(--muted); }
.stl-erp .erp-nav a {
	color: var(--ink-2); font-size: 14px; font-weight: 500; gap: 11px;
	padding: 8px 10px; margin: 1px 0; border-radius: 10px; position: relative;
	transition: background .12s, color .12s;
}
.erp-nav .i { width: 20px; display: inline-flex; justify-content: center; color: var(--muted); font-size: 0; }
.stl-erp .erp-nav a:hover { background: var(--surface-3); color: var(--ink); }
.stl-erp .erp-nav a:hover .i { color: var(--ink-2); }
.stl-erp .erp-nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; box-shadow: none; }
.stl-erp .erp-nav a.on .i { color: var(--brand); }
.stl-erp .erp-nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.erp-nav .b { background: var(--bad); box-shadow: none; font-size: 11px; min-width: 20px; text-align: center; padding: 1px 6px; }
.erp-ios-steps { background: var(--surface-3); color: var(--ink-2); }
.erp-ios-steps strong { color: var(--ink); }

.erp-me { border-top: 1px solid var(--line); }
.stl-erp .erp-me-name { color: var(--ink); }
.erp-me-name small { color: var(--muted); }
.stl-erp .erp-out { color: var(--bad); border-color: #f5c2c2; }
.erp-avatar { background: linear-gradient(150deg, #3b6ef0, #1a43b3); color: #fff; font-weight: 600; font-size: 13px; width: 32px; height: 32px; }

/* ================================ Top bars ================================ */
.erp-desk {
	position: sticky; top: 0; z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	height: 60px; padding: 0 32px;
	background: rgba(245, 246, 250, .82);
	backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
	border-bottom: 1px solid var(--line);
}
.erp-crumb { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.erp-crumb .ico { color: var(--muted-2); }
.erp-crumb strong { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erp-desk-r { display: flex; align-items: center; gap: 10px; }
.erp-kbtn {
	display: inline-flex; align-items: center; gap: 9px; width: 300px; height: 38px; padding: 0 8px 0 12px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
	font: inherit; font-size: 13.5px; cursor: pointer; box-shadow: var(--sh-xs); transition: border-color .12s, box-shadow .12s;
}
.erp-kbtn:hover { border-color: #cfd5e1; box-shadow: var(--sh-sm); }
.erp-kbtn span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stl-erp kbd {
	display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 6px;
	background: var(--surface-3); border: 1px solid var(--line); border-bottom-width: 2px;
	font: 600 11px/1 "Inter", system-ui, sans-serif; color: var(--muted);
}
.stl-erp a.erp-desk-cta {
	display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px;
	background: var(--brand); color: #fff; font-weight: 600; font-size: 13.5px; text-decoration: none;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14); transition: background .12s;
}
.stl-erp a.erp-desk-cta:hover { background: var(--brand2); color: #fff; }
.erp-usermenu { position: relative; }
.erp-usermenu > summary {
	list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer;
	height: 38px; padding: 0 8px 0 4px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 13.5px;
}
.erp-usermenu > summary::-webkit-details-marker { display: none; }
.erp-usermenu > summary:hover { background: var(--surface-3); }
.erp-uname { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.erp-usermenu-list {
	position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; padding: 6px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); z-index: 60;
}
.stl-erp .erp-usermenu-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.stl-erp .erp-usermenu-list a:hover { background: var(--surface-3); color: var(--ink); }
.stl-erp .erp-usermenu-list a.erp-usermenu-out { color: var(--bad); border-top: 1px solid var(--line-2); margin-top: 4px; border-radius: 0 0 8px 8px; }

@media (min-width: 901px) {
	.erp-me { display: none; }
}

/* ================================ Content ================================ */
.erp-content { padding: 28px 32px 72px; max-width: 1320px; }
.stl-erp .wrap > h1, .stl-erp h1.wp-heading-inline {
	font-size: 26px; font-weight: 650; font-weight: 600; letter-spacing: -.025em; color: var(--ink); line-height: 1.25; margin: 0 0 6px;
}
.stl-erp .stl-lead, .stl-erp .wrap > p.stl-lead { color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 760px; margin: 0 0 20px; }
.stl-erp h2 { font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; margin: 28px 0 12px; }
.stl-erp h3 { font-size: 15px; font-weight: 600; color: var(--ink); }
.stl-erp h4 { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.stl-erp .stl-sub, .stl-erp .description { color: var(--muted); }
.stl-erp hr { border: 0; border-top: 1px solid var(--line); }
.stl-erp .erp-ptitle { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

/* Buttons */
.stl-erp .button, .stl-erp .page-title-action {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	min-height: 36px; padding: 0 14px; border-radius: 10px;
	background: var(--surface); color: var(--ink-2); border: 1px solid #d9dee8;
	font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.2; text-decoration: none;
	box-shadow: var(--sh-xs); transition: background .12s, border-color .12s, color .12s, box-shadow .12s; transform: none;
}
.stl-erp .button:hover, .stl-erp .page-title-action:hover { background: var(--surface-2); border-color: #c5ccd9; color: var(--ink); transform: none; }
.stl-erp .button-primary, .stl-erp .stl-cta, .stl-erp .button.button-primary {
	background: var(--brand); border-color: var(--brand); color: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.stl-erp .button-primary:hover, .stl-erp .stl-cta:hover, .stl-erp .button.button-primary:hover { background: var(--brand2); border-color: var(--brand2); color: #fff; transform: none; }
.stl-erp .button-hero { min-height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }
.stl-erp .button-small { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.stl-erp .button:focus-visible, .stl-erp a:focus-visible, .stl-erp button:focus-visible, .stl-erp summary:focus-visible { outline: 3px solid rgba(31, 79, 209, .28); outline-offset: 2px; }
.stl-erp .stl-del, .stl-erp a.stl-del { color: var(--bad); }
.stl-erp .wrap > h1 .page-title-action { font-size: 13px; min-height: 32px; vertical-align: middle; }

/* Inputs */
.stl-erp input[type=text], .stl-erp input[type=email], .stl-erp input[type=number], .stl-erp input[type=date],
.stl-erp input[type=time], .stl-erp input[type=url], .stl-erp input[type=password], .stl-erp input[type=tel],
.stl-erp input[type=search], .stl-erp select, .stl-erp textarea {
	min-height: 40px; padding: 8px 12px; border: 1px solid #d9dee8; border-radius: 10px;
	background: var(--surface); color: var(--ink); font-size: 14px; box-shadow: var(--sh-xs);
	transition: border-color .12s, box-shadow .12s;
}
.stl-erp select { padding-right: 32px; -webkit-appearance: none; appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 10px center; }
.stl-erp select[multiple] { background-image: none; padding-right: 12px; }
.stl-erp input::placeholder, .stl-erp textarea::placeholder { color: var(--muted-2); }
.stl-erp input:hover, .stl-erp select:hover, .stl-erp textarea:hover { border-color: #c5ccd9; }
.stl-erp input:focus, .stl-erp select:focus, .stl-erp textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 79, 209, .12); }
.stl-erp input[readonly], .stl-erp input:disabled, .stl-erp select:disabled { background: var(--surface-2); color: var(--muted); }
.stl-erp input[type=checkbox], .stl-erp input[type=radio] { accent-color: var(--brand); width: 17px; height: 17px; }
.stl-erp input[type=file] { font-size: 13px; color: var(--muted); }
.stl-erp input[type=file]::file-selector-button {
	margin-right: 10px; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid #d9dee8;
	background: var(--surface); color: var(--ink-2); font: 600 13px "Inter", system-ui, sans-serif; cursor: pointer;
}
.stl-erp label { color: var(--ink-2); }

/* Cards and surfaces */
.stl-erp .stl-card, .stl-erp .stl-sec, .stl-erp .stlp-card {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.stl-erp .stl-card { padding: 20px 22px; }
.stl-erp .stl-card h3, .stl-erp .stlp-card h3 {
	text-transform: none; letter-spacing: -.01em; font-size: 15px; font-weight: 600; color: var(--ink);
	border-bottom: 0; padding-bottom: 0; margin: 0 0 14px;
}
.stl-erp .stl-cards { gap: 16px; }
.stl-erp .stl-sec h2 { margin-top: 0; }
.stl-erp .stl-num { background: var(--brand-soft); color: var(--brand); box-shadow: none; }

/* KPI tiles */
.stl-erp .stl-stats, .stl-erp .stlp-stats { gap: 14px; }
.stl-erp .stl-stat, .stl-erp .stlp-stat {
	background: var(--surface); border: 1px solid var(--line); border-left: 1px solid var(--line);
	border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-sm);
}
.stl-erp .stl-stat span, .stl-erp .stlp-stat span { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.stl-erp .stl-stat strong, .stl-erp .stlp-stat strong { font-size: 24px; font-weight: 650; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin-top: 6px; }
.stl-erp .stl-stat-red strong, .stl-erp .stlp-stat-red strong { color: var(--bad); }
.stl-erp .stl-stat-green strong, .stl-erp .stlp-stat-green strong { color: var(--ok); }

/* Tables */
.stl-erp .widefat, .stl-erp .stlp-table {
	border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--sh-sm);
	border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.stl-erp .widefat th, .stl-erp .stlp-table th {
	background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600;
	text-transform: uppercase; letter-spacing: .05em; padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.stl-erp .widefat td, .stl-erp .stlp-table td { padding: 13px 14px; font-size: 14px; color: var(--ink-2); border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.stl-erp .widefat tbody tr:last-child td, .stl-erp .stlp-table tbody tr:last-child td { border-bottom: 0; }
.stl-erp .widefat tbody tr:hover td, .stl-erp .stlp-table tbody tr:hover td { background: #fafbff; }
.stl-erp .widefat td a, .stl-erp .stlp-table td a { font-weight: 600; text-decoration: none; }
.stl-erp .widefat td a:hover { text-decoration: underline; }
.stl-erp .stlp-card .stlp-table { box-shadow: none; }
.stl-erp .stl-mini td { border-bottom-color: var(--line-2); padding: 7px 0; }

/* Form tables become clean settings cards */
.stl-erp .form-table { border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); background: var(--surface); }
.stl-erp .form-table th { color: var(--ink); font-weight: 600; font-size: 13.5px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.stl-erp .form-table td { padding: 14px 20px; border-bottom: 1px solid var(--line-2); }

/* Tabs → segmented control */
.stl-erp .nav-tab-wrapper {
	display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; margin: 4px 0 18px;
	background: var(--surface-3); border: 1px solid var(--line); border-radius: 12px;
}
.stl-erp .nav-tab { border: 0; margin: 0; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.stl-erp .nav-tab:hover { color: var(--ink); }
.stl-erp .nav-tab-active, .stl-erp .nav-tab-active:hover { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); border: 0; }

/* Notices and toasts */
.stl-erp .notice { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid #3b82f6; border-radius: 12px; box-shadow: var(--sh-xs); padding: 4px 16px; }
.stl-erp .notice-success { border-left-color: var(--ok); }
.stl-erp .notice-error { border-left-color: var(--bad); background: #fffafa; }
.stl-erp .notice-warning { border-left-color: var(--warn); }
.erp-toast {
	position: fixed !important; top: 74px; right: 24px; z-index: 120; width: min(420px, calc(100vw - 32px));
	display: flex; align-items: flex-start; gap: 10px; margin: 0 !important;
	padding: 14px 14px 14px 16px !important; border: 1px solid var(--line) !important; border-left-width: 1px !important;
	border-radius: 14px !important; box-shadow: var(--sh-lg) !important; background: var(--surface) !important;
	animation: erp-toast-in .28s cubic-bezier(.2, .8, .2, 1);
}
.erp-toast p { margin: 1px 0 0 !important; flex: 1; color: var(--ink); font-weight: 500; line-height: 1.45; }
.erp-toast-i { display: inline-flex; color: #3b82f6; }
.erp-toast.notice-success .erp-toast-i { color: var(--ok); }
.erp-toast.notice-error .erp-toast-i { color: var(--bad); }
.erp-toast.notice-warning .erp-toast-i { color: var(--warn); }
.erp-toast-x { background: none; border: 0; color: var(--muted-2); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-flex; }
.erp-toast-x:hover { background: var(--surface-3); color: var(--ink); }
.erp-toast.out { opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; }
@keyframes erp-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

/* "How this works" boxes */
.stl-erp .stl-howto { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0; margin: 0 0 18px; max-width: 860px; box-shadow: var(--sh-xs); }
.stl-erp .stl-howto summary { list-style: none; cursor: pointer; padding: 11px 16px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.stl-erp .stl-howto summary::-webkit-details-marker { display: none; }
.stl-erp .stl-howto summary::before { content: "?"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }
.stl-erp .stl-howto[open] summary { border-bottom: 1px solid var(--line-2); }
.stl-erp .stl-howto ol { margin: 12px 16px 14px 36px; color: var(--ink-2); line-height: 1.6; }

/* Details / summaries elsewhere */
.stl-erp .stl-snapshot > summary, .stl-erp .stl-matrix > summary { font-weight: 600; color: var(--ink); cursor: pointer; }

/* Status pills inside the app */
.stl-erp .stl-pill { font-size: 12px; letter-spacing: 0; }

/* Filters / toolbars */
.stl-erp .stl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.stl-erp .tablenav-pages a, .stl-erp .tablenav-pages span { border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; padding: 6px 12px; text-decoration: none; }
.stl-erp .tablenav-pages .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================ Today screen ============================ */
.stl-erp .stl-home > h1 { font-size: 28px; }
.stl-erp .stl-quick { gap: 10px; margin: 18px 0 8px; }
.stl-erp .stl-quick-btn {
	background: var(--brand); color: #fff !important; border: 1px solid var(--brand); border-radius: 12px;
	padding: 10px 16px; font-size: 14px; font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.stl-erp .stl-quick-btn + .stl-quick-btn { background: var(--surface); color: var(--ink-2) !important; border: 1px solid #d9dee8; box-shadow: var(--sh-xs); }
.stl-erp .stl-quick-btn + .stl-quick-btn:hover { background: var(--surface-2); }
.stl-erp .stl-quick-btn span { font-size: 0; display: inline-flex; }
.stl-erp .stl-home-h { font-size: 12px !important; color: var(--muted); letter-spacing: .08em; }
.stl-erp .stl-tasks { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stl-erp .stl-task {
	background: var(--surface); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--r-lg);
	padding: 18px; box-shadow: var(--sh-sm); color: var(--ink); transition: box-shadow .15s, border-color .15s, transform .15s;
}
.stl-erp .stl-task:hover { border-color: #d3d9e4; box-shadow: var(--sh-md); transform: translateY(-1px); }
.stl-erp .stl-task strong { font-size: 15px; font-weight: 600; color: var(--ink); }
.stl-erp .stl-task-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-size: 0; }
.stl-erp .stl-task-count { font-size: 26px; font-weight: 650; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.stl-erp .stl-task-hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.stl-erp .stl-task-btn { color: var(--brand); font-size: 13.5px; display: inline-flex; align-items: center; gap: 4px; }
.stl-erp .stl-task-alert { background: var(--surface); }
.stl-erp .stl-task-alert .stl-task-icon { background: var(--bad-soft); color: var(--bad); }
.stl-erp .stl-task-alert .stl-task-count { color: var(--bad); }
.stl-erp .stl-task-warn .stl-task-icon { background: var(--warn-soft); color: var(--warn); }
.stl-erp .stl-task-warn .stl-task-count { color: #b45309; }
.stl-erp .stl-allclear a { background: var(--ok-soft); border-color: #c7f0dc; color: #067a54 !important; }
.stl-erp .stl-allclear-big { background: var(--ok-soft); border-color: #c7f0dc; color: #065f46; border-radius: var(--r-lg); }
.stl-erp .stl-setup { border-radius: var(--r-lg); }
.stl-erp .stl-bar { background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.stl-erp .stl-bar span { background: linear-gradient(90deg, #3b6ef0, var(--brand)); border-radius: 99px; }

/* ============================ Parcels screen ============================ */
.stl-erp .stl-pagehead h1 { font-size: 26px; }
.stl-erp .stl-seg { background: var(--surface-3); border: 1px solid var(--line); border-radius: 11px; }
.stl-erp .stl-seg a { color: var(--muted); }
.stl-erp .stl-seg a.on { color: var(--ink); box-shadow: var(--sh-sm); }
.stl-erp .stl-chip { background: var(--surface); border-color: var(--line); color: var(--ink-2); font-weight: 500; box-shadow: var(--sh-xs); }
.stl-erp .stl-chip b { background: var(--surface-3); color: var(--ink-2); font-weight: 600; }
.stl-erp .stl-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: var(--sh-sm); }
.stl-erp .stl-chip.on b { background: rgba(255, 255, 255, .16); color: #fff; }

.stl-erp .pc { border-radius: 18px; border-color: var(--line); box-shadow: var(--sh-sm); padding: 20px 22px 16px 24px; }
.stl-erp .pc::before { width: 4px; }
.stl-erp .pc:hover { box-shadow: var(--sh-md); border-color: #d6dce7; }
.stl-erp .pc-bilty { font-weight: 650; font-weight: 600; }
.stl-erp .pc-sid { background: var(--surface-3); color: var(--muted); }
.stl-erp .pc-facts { border-top-color: var(--line-2); }
.stl-erp .pc-facts dt { color: var(--muted-2); letter-spacing: .06em; }
.stl-erp .pc-foot { border-top-color: var(--line-2); }
.stl-erp .pc-btn { border-radius: 10px; border-color: #d9dee8; color: var(--ink-2) !important; box-shadow: var(--sh-xs); font-weight: 600; }
.stl-erp .pc-btn:hover { background: var(--surface-2); border-color: #c5ccd9; }
.stl-erp .pc-btn-main { background: var(--brand); border-color: var(--brand); color: #fff !important; box-shadow: 0 1px 2px rgba(16, 24, 40, .1), inset 0 1px 0 rgba(255, 255, 255, .14); }
.stl-erp .pc-btn-main:hover { background: var(--brand2); color: #fff !important; }
.stl-erp .pc-btn-next { background: var(--ok-soft); border-color: #bfeed6; color: #067a54 !important; }
.stl-erp .pc-btn-next:hover { background: #d9f7e8; border-color: #9fe3c2; }
.stl-erp .pc-btn.stl-wa { background: #f2fbf6; border-color: #c9ecd8; color: #0b7a5a !important; }
.stl-erp .pc-flag { font-weight: 600; }
.stl-erp .stl-qs-panel, .stl-erp .pc-menu-list { border-color: var(--line); border-radius: 14px; box-shadow: var(--sh-lg); }

/* Parcel page head strip */
.stl-erp .stl-headstrip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }

/* ============================ Command palette ============================ */
.erp-palette { position: fixed; inset: 0; z-index: 140; background: rgba(15, 23, 42, .38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.erp-palette[hidden] { display: none !important; }
body.erp-pal-open { overflow: hidden; }
.erp-palette-box { width: 100%; max-width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .35); overflow: hidden; animation: erp-pal-in .18s ease-out; }
@keyframes erp-pal-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
.erp-palette-in { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); color: var(--muted); }
.stl-erp .erp-palette-in input[type=search] { flex: 1; border: 0 !important; box-shadow: none !important; background: transparent; font-size: 16px; min-height: 48px; padding: 0; }
.erp-palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.erp-pal-h { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted-2); text-transform: uppercase; letter-spacing: .07em; }
.stl-erp a.erp-pal-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.stl-erp a.erp-pal-row span:nth-child(2) { flex: 1; }
.erp-pal-i { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--muted); }
.stl-erp a.erp-pal-row.on, .stl-erp a.erp-pal-row:hover { background: var(--brand-soft); color: var(--brand-ink); }
.erp-pal-row.on .erp-pal-i { background: #fff; color: var(--brand); box-shadow: var(--sh-xs); }
.erp-pal-empty { padding: 22px; text-align: center; color: var(--muted); }
.erp-palette-foot { display: flex; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 12px; }
.erp-palette-foot kbd { margin-right: 3px; }

/* Page-load progress line */
.erp-progress { position: fixed; top: 0; left: 0; height: 2.5px; width: 0; z-index: 200; background: linear-gradient(90deg, #5b8cff, var(--brand)); box-shadow: 0 0 8px rgba(31, 79, 209, .5); opacity: 0; pointer-events: none; }
.erp-progress.run { opacity: 1; width: 82%; transition: width 6s cubic-bezier(.1, .7, .2, 1); }
.erp-progress.done { opacity: 0; width: 100%; transition: opacity .3s .1s, width .2s; }

/* Gentle entrance for each screen */
.erp-content > * { animation: erp-rise .32s ease-out both; }
@keyframes erp-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.erp-content > *, .erp-toast, .erp-palette-box { animation: none; }
	.erp-progress.run { transition: none; }
}

/* ================================ Phone ================================ */
@media (max-width: 900px) {
	.erp-desk { display: none; }
	.erp-side { width: 290px; }
	.erp-top {
		background: rgba(255, 255, 255, .9); color: var(--ink);
		backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
		border-bottom: 1px solid var(--line); box-shadow: none;
		padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top));
	}
	.erp-burger { background: transparent !important; color: var(--ink-2) !important; width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; }
	.erp-burger:active { background: var(--surface-3) !important; }
	.erp-top-logo { box-shadow: 0 0 0 1px var(--line); width: 32px; height: 36px; }
	.erp-title { color: var(--ink); font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; }
	.erp-topsearch { top: calc(57px + env(safe-area-inset-top)); }
	.erp-content { padding: 18px 16px calc(100px + env(safe-area-inset-bottom)); }
	.stl-erp .wrap > h1, .stl-erp h1.wp-heading-inline, .stl-erp .stl-pagehead h1 { font-size: 23px; }
	.stl-erp .stl-home > h1 { font-size: 24px; }
	.erp-toast { top: calc(66px + env(safe-area-inset-top)); right: 16px; }

	.erp-bottom { background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -14px rgba(16, 24, 40, .3); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
	.stl-erp .erp-bottom a { color: var(--muted); font-size: 11px; font-weight: 600; gap: 3px; padding: 6px 2px 4px; }
	.erp-bottom .bi { font-size: 0; display: inline-flex; }
	.stl-erp .erp-bottom a.on { color: var(--brand); background: transparent; }
	.stl-erp .erp-bottom a.on .bi { background: var(--brand-soft); border-radius: 999px; padding: 3px 16px; margin: -3px 0; }
	.stl-erp .erp-bottom a.erp-bn-book .bi {
		width: 46px; height: 46px; margin-top: -22px; padding: 0; border-radius: 15px; border: 3px solid #fff;
		background: var(--brand); color: #fff; box-shadow: 0 8px 18px -6px rgba(31, 79, 209, .65); display: inline-grid; place-items: center;
	}
	.stl-erp .erp-bottom a.erp-bn-book.on .bi { padding: 0; margin-top: -22px; background: var(--brand2); }
	.stl-erp .widefat td { white-space: nowrap; }
	.stl-erp .stl-task-icon { width: 40px; height: 40px; }
	.stl-erp .stl-quick-btn span { display: none; }
}

/* ================================ Sign in ================================ */
body.erp-login-body {
	background:
		radial-gradient(900px 500px at 15% -10%, rgba(91, 140, 255, .35), transparent 60%),
		radial-gradient(700px 500px at 110% 110%, rgba(31, 79, 209, .35), transparent 60%),
		linear-gradient(160deg, #0b1d4d 0%, #0a1430 100%);
}
.erp-login-card { border-radius: 22px; padding: 34px 28px 26px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.erp-login-brand img { height: 104px; filter: drop-shadow(0 8px 18px rgba(13, 31, 77, .25)); }
.erp-login-brand h1 { color: var(--ink); font-size: 22px; font-weight: 650; font-weight: 600; letter-spacing: -.02em; margin-top: 14px; }
.erp-login-brand p { color: var(--muted); }
.erp-login form label { color: var(--ink-2); font-weight: 600; }
.erp-login form input[type=text], .erp-login form input[type=password] { background: var(--surface); border: 1px solid #d9dee8; border-radius: 12px; min-height: 48px; box-shadow: var(--sh-xs); }
.erp-login form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 79, 209, .14); }
.erp-btn { background: var(--brand); border-radius: 12px; min-height: 50px; font-weight: 600; box-shadow: 0 10px 22px -10px rgba(31, 79, 209, .8), inset 0 1px 0 rgba(255, 255, 255, .16); }
.erp-btn:hover { background: var(--brand2); }
.erp-eye { background: var(--surface-3); color: var(--ink-2); }
.erp-login-foot { color: rgba(255, 255, 255, .6); }

/* WhatsApp composer */
.erp-wa-box { border-radius: 18px; box-shadow: 0 24px 60px -12px rgba(15, 23, 42, .35); }

@media print {
	.erp-desk, .erp-palette, .erp-progress, .erp-toast { display: none !important; }
}

/* Icon alignment helpers */
.pc-flag, .stl-chip { display: inline-flex; align-items: center; gap: 5px; }
.stl-erp .pc-menu-list a, .stl-erp .pc-menu-list button { display: flex; align-items: center; gap: 10px; }
.stl-erp .pc-menu-list .ico { color: var(--muted); }
.stl-erp .pc-menu-list .pc-del-link .ico { color: var(--bad); }
.stl-erp .stl-seg a { display: inline-flex; align-items: center; gap: 6px; }
.stl-erp .stl-qs-more > summary { gap: 4px; }
.stl-erp .stl-next-big { gap: 8px; }
.stl-erp .stl-search span { display: inline-flex; color: var(--muted-2); opacity: 1; }
.stl-erp .stl-empty { border-radius: 18px; border-color: #d9dee8; background: var(--surface); }
.stl-erp .stl-empty-ico { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); }
.stl-erp .stl-allclear a { display: inline-flex; align-items: center; gap: 4px; }
.stl-erp .stl-allclear-big { display: flex; align-items: center; gap: 10px; }

/* One search, one Book button: the top bar has them on a computer, the bottom bar on a phone. */
@media (min-width: 901px) { .erp-staff .erp-side .erp-search { display: none; } }
.erp-staff .stl-parcels .stl-cta { display: none; }

/* Sticky save bars */
.stl-erp .stl-savebar {
	background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px);
	border-top: 1px solid var(--line); padding: 12px 16px; margin: 0 -16px; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px -18px rgba(16, 24, 40, .35);
}
.stl-erp .stl-access-save { background: linear-gradient(to top, var(--bg) 70%, rgba(245, 246, 250, 0)); }

@media (max-width: 900px) {
	.stl-erp .stl-task-btn { display: none; }
	.stl-erp .stl-savebar { bottom: calc(70px + env(safe-area-inset-bottom)); margin: 0 -8px; }
}
.stl-erp .stl-jump a { display: inline-flex; align-items: center; gap: 6px; border-color: var(--line); box-shadow: var(--sh-xs); color: var(--ink-2) !important; }
.stl-erp .stl-jump a .ico { color: var(--muted); }
.stl-erp .stl-jump { background: linear-gradient(to bottom, var(--bg) 80%, rgba(245, 246, 250, 0)); top: 60px; }
@media (max-width: 900px) { .stl-erp .stl-jump { top: calc(57px + env(safe-area-inset-top)); } }
.stl-erp .stl-form h2 { border-bottom: 0; padding-bottom: 0; }
.erp-palette-in input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

/* ============================ Tasks ============================ */
.erp-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink-2) !important; text-decoration: none; }
.erp-bell:hover { background: var(--surface-3); }
.erp-bell b, .erp-bell-m b { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--brand); color: #fff; font: 700 10.5px/18px "Inter", sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.erp-bell.late b, .erp-bell-m.late b { background: var(--bad); }
.erp-bell-m { position: relative; margin-left: auto; text-decoration: none; }
.erp-bell-m + .erp-find { margin-left: 0; }

.stl-task-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.stl-task-cols:not(:has(.stl-task-give)) { grid-template-columns: minmax(0, 1fr); }
.stl-task-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 8px !important; }
.stl-task-h span { background: var(--surface-3); color: var(--ink-2); border-radius: 99px; padding: 0 8px; font-size: 11.5px; letter-spacing: 0; }
.stl-task-h-late { color: var(--bad) !important; }
.stl-task-h-late span { background: var(--bad-soft); color: var(--bad); }
.stl-task-list { display: flex; flex-direction: column; gap: 8px; }
.stl-trow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-xs); }
.stl-trow-late { border-left: 3px solid var(--bad); }
.stl-trow-today { border-left: 3px solid var(--warn); }
.stl-trow-done { opacity: .75; }
.stl-trow-i { flex: 0 0 auto; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.stl-trow-late .stl-trow-i { background: var(--bad-soft); color: var(--bad); }
.stl-trow-done .stl-trow-i { background: var(--ok-soft); color: var(--ok); }
.stl-trow-body { flex: 1; min-width: 0; }
.stl-erp a.stl-trow-t { color: var(--ink); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.stl-erp a.stl-trow-t:hover { color: var(--brand); }
.stl-trow-d { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 3px; font-size: 13px; color: var(--muted); }
.stl-trow-d > span { display: inline-flex; align-items: center; gap: 5px; }
.stl-trow-late .stl-trow-when { color: var(--bad); font-weight: 600; }
.stl-trow-act { display: flex; gap: 6px; flex: 0 0 auto; }
.stl-task-give { position: sticky; top: 76px; }
.stl-task-give textarea { width: 100%; }
@media (max-width: 900px) {
	.stl-task-cols { grid-template-columns: 1fr; }
	.stl-task-give { position: static; }
	.stl-trow { flex-wrap: wrap; padding: 13px 14px; }
	.stl-trow-act { width: 100%; padding-left: 52px; }
	.stl-trow-act .pc-btn { flex: 1; justify-content: center; }
}

/* Report tools */
.stl-report-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -4px 0 16px; }
.stl-report-tools .stl-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }

/* Website enquiries */
.stl-lead-msg { margin: 12px 0 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.stl-lead-notes { margin: 10px 0 0; white-space: normal; }
