@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ============================================================ Public portal */
.velo-portal {
	font-family: 'Inter', sans-serif;
	color: #1e293b;
	max-width: 1320px;
	margin: 0 auto;
	padding: 8px 4px 48px;
}
.velo-portal * { box-sizing: border-box; }

.velo-h2 {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 22px;
	font-weight: 800;
	color: #0f2a4a;
	margin: 40px 0 16px;
}

.velo-label {
	display: block;
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.55);
	font-weight: 600;
}
.velo-card .velo-label, .velo-remarks .velo-label { color: #94a3b8; }

/* Search */
.velo-search {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 10px;
	box-shadow: 0 8px 24px rgba(15,42,74,0.08);
	margin-top: 8px;
}
.velo-search form { display: flex; gap: 10px; flex-wrap: wrap; }
.velo-search input {
	flex: 1 1 220px;
	border: none;
	outline: none;
	padding: 16px;
	font-size: 15px;
	min-width: 0;
	background: transparent;
	font-family: inherit;
}
.velo-search button {
	background: #0e8691;
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 14px 22px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
}
.velo-search button:hover { background: #0b7079; }
.velo-sample { text-align: center; font-size: 12.5px; color: #64748b; margin: 10px 0 2px; }
.velo-sample a { color: #0e8691; font-weight: 700; text-decoration: none; }

/* Not found */
.velo-notfound {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	text-align: center;
	padding: 56px 24px;
	margin-top: 24px;
}
.velo-notfound-icon {
	width: 64px; height: 64px;
	margin: 0 auto;
	border-radius: 50%;
	background: rgba(14,134,145,0.1);
	font-size: 28px;
	display: flex; align-items: center; justify-content: center;
}
.velo-notfound h3 { font-family: 'Plus Jakarta Sans', sans-serif; color: #0f2a4a; margin: 16px 0 8px; font-size: 20px; }
.velo-notfound p { color: #64748b; margin: 0; }

/* Summary */
.velo-summary {
	background: linear-gradient(135deg, #0f2a4a, #0b2036);
	border-radius: 20px;
	padding: 28px;
	color: #fff;
	margin-top: 28px;
	box-shadow: 0 16px 40px rgba(11,32,54,0.25);
}
.velo-summary-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.velo-trk { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 30px; font-weight: 800; letter-spacing: 0.02em; display: block; margin-top: 4px; }
.velo-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-top: 24px; }
.velo-summary-grid strong { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; }
.velo-route { display: flex; align-items: center; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.velo-route-end { font-size: 12px; font-weight: 600; color: #cbd5e1; }
.velo-route-line { flex: 1; min-width: 40px; border-top: 2px dashed rgba(255,255,255,0.35); }
.velo-route-mid {
	background: #0e8691; color: #fff;
	font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
	padding: 4px 12px; border-radius: 999px;
}

/* Status badges */
.velo-badge {
	display: inline-flex; align-items: center; gap: 7px;
	font-weight: 700; font-size: 12px;
	padding: 6px 14px; border-radius: 999px;
	white-space: nowrap;
}
.velo-badge i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.velo-badge--order_received { background: #e0f2fe; color: #0369a1; }
.velo-badge--picked_up { background: #ede9fe; color: #6d28d9; }
.velo-badge--processing { background: #ffedd5; color: #c2410c; }
.velo-badge--in_transit { background: #fef9c3; color: #a16207; }
.velo-badge--arrived_at_facility { background: #ccfbf1; color: #0f766e; }
.velo-badge--out_for_delivery { background: #fce7f3; color: #be185d; }
.velo-badge--delivered { background: #d1fae5; color: #047857; }

/* Progress */
.velo-progress { position: relative; margin-top: 8px; }
.velo-progress-track { position: absolute; top: 17px; left: 0; right: 0; height: 4px; border-radius: 999px; background: #e2e8f0; }
.velo-progress-fill { position: absolute; top: 17px; left: 0; height: 4px; border-radius: 999px; background: #0e8691; transition: width 0.5s ease; }
.velo-steps { display: flex; position: relative; }
.velo-step { flex: 1; text-align: center; min-width: 0; }
.velo-step-dot {
	width: 36px; height: 36px; margin: 0 auto;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #e2e8f0;
	color: #94a3b8;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 12px;
	position: relative; z-index: 1;
}
.velo-step.is-done .velo-step-dot,
.velo-step.is-current .velo-step-dot { background: #0e8691; border-color: #0e8691; color: #fff; }
.velo-step.is-current .velo-step-dot { box-shadow: 0 0 0 6px rgba(14,134,145,0.18); }
.velo-step-label { margin-top: 8px; font-size: 10.5px; font-weight: 600; color: #94a3b8; line-height: 1.25; }
.velo-step.is-done .velo-step-label { color: #334155; }
.velo-step.is-current .velo-step-label { color: #0e8691; font-weight: 700; }
@media (max-width: 640px) {
	.velo-step:not(.is-current) .velo-step-label { display: none; }
}

/* Two-column layout */
.velo-two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 880px) { .velo-two-col { grid-template-columns: 1fr; } }

/* History */
.velo-history { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #eef2f7; }
.velo-history li {
	position: relative;
	background: #f8fafc;
	border: 1px solid #eef2f7;
	border-radius: 14px;
	padding: 16px;
	margin: 0 0 14px 0;
}
.velo-history li::before {
	content: '';
	position: absolute; left: -24px; top: 20px;
	width: 10px; height: 10px; border-radius: 50%;
	background: #cbd5e1; border: 2px solid #fff;
}
.velo-history li.is-current { background: rgba(14,134,145,0.06); border-color: rgba(14,134,145,0.25); }
.velo-history li.is-current::before { background: #0e8691; }
.velo-history strong { font-family: 'Plus Jakarta Sans', sans-serif; color: #0f2a4a; font-size: 14px; }
.velo-when { font-size: 12px; color: #94a3b8; margin-left: 8px; font-weight: 500; }
.velo-pill {
	background: #0e8691; color: #fff;
	font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em;
	padding: 2px 8px; border-radius: 999px;
	margin-right: 6px; text-transform: uppercase;
	vertical-align: 1px;
}
.velo-loc { color: #475569; font-size: 13.5px; margin-top: 4px; }
.velo-desc { color: #64748b; font-size: 13.5px; margin: 4px 0 0; }

/* Cards */
.velo-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 22px;
	box-shadow: 0 4px 14px rgba(15,42,74,0.05);
}
.velo-details-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 13.5px; }
.velo-details-row:last-child { border-bottom: none; }
.velo-details-row span:first-child { color: #64748b; }
.velo-details-row span:last-child { font-weight: 600; color: #0f2a4a; text-align: right; }
.velo-remarks { margin-top: 16px; }
.velo-remarks p { margin: 6px 0 0; color: #475569; font-size: 13.5px; }

/* Map */
.velo-map iframe { width: 100%; height: 420px; border: 1px solid #e2e8f0; border-radius: 16px; }
.velo-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 12px; font-size: 12.5px; color: #64748b; align-items: center; }
.velo-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.velo-dot--origin { background: #38bdf8; }
.velo-dot--current { background: #0e8691; }
.velo-dot--dest { background: #10b981; }
.velo-legend b { color: #0f2a4a; font-weight: 700; margin-left: 2px; }
@media (max-width: 640px) { .velo-map iframe { height: 300px; } }

/* ==================================================================== Admin */
.velo-admin-wrap { max-width: 1400px; font-family: 'Inter', sans-serif; }
.velo-admin-notice {
	background: #e7f6f7;
	border-left: 4px solid #0e8691;
	padding: 10px 16px;
	margin: 14px 0 20px;
	border-radius: 6px;
	color: #0b5560;
	font-weight: 600;
}
.velo-admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 18px 0; }
.velo-admin-toolbar .left { display: flex; gap: 8px; align-items: center; flex: 1; }
.velo-admin-toolbar input[type="text"] { min-width: 320px; }
table.velo-table { border-collapse: collapse; background: #fff; border: 1px solid #dcdcdc; border-radius: 8px; overflow: hidden; }
table.velo-table th { text-align: left; padding: 12px 14px; background: #f8fafc; color: #0f2a4a; font-weight: 700; border-bottom: 1px solid #e2e8f0; }
table.velo-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; background: #fff; }
.velo-trk-cell { font-weight: 700; color: #0f2a4a; font-family: 'Plus Jakarta Sans', sans-serif; }
.velo-back { display: inline-block; margin-bottom: 14px; text-decoration: none; color: #2271b1; }

.velo-admin-form {
	background: #fff;
	border: 1px solid #dcdcdc;
	border-radius: 10px;
	padding: 22px;
	margin-top: 14px;
}
.velo-form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1100px) { .velo-form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 782px) { .velo-form-grid { grid-template-columns: 1fr; } }
.velo-field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 5px; color: #0f2a4a; }
.velo-field input, .velo-field select, .velo-field textarea { width: 100%; max-width: none; box-sizing: border-box; }
.velo-field--full { grid-column: 1 / -1; }
.velo-section-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 800; color: #0f2a4a; margin: 0 0 10px; }

.velo-events-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; margin-top: 18px; }
@media (max-width: 1100px) { .velo-events-grid { grid-template-columns: 1fr; } }
.velo-eventlist { list-style: none; margin: 0; padding: 0; }
.velo-eventlist li {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: flex-start;
}
.velo-eventlist .velo-when { font-size: 12px; color: #94a3b8; margin-left: 8px; }

/* =============================================================== Dashboard */
.velo-dash-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 20px 0 28px; }
@media (max-width: 1100px) { .velo-dash-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 782px) { .velo-dash-grid { grid-template-columns: repeat(2, 1fr); } }
.velo-dash-card { background: #fff; border: 1px solid #dcdcdc; border-radius: 10px; padding: 18px; text-decoration: none; display: block; }
a.velo-dash-card:hover { border-color: #0e8691; }
.velo-dash-num { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; color: #0f2a4a; }
.velo-dash-label { font-size: 12.5px; color: #64748b; margin-top: 4px; }
.velo-dash-card.is-accent { background: #0f2a4a; border-color: #0f2a4a; }
.velo-dash-card.is-accent .velo-dash-num { color: #fff; }
.velo-dash-card.is-accent .velo-dash-label { color: #94a3b8; }
.velo-dash-h { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 800; color: #0f2a4a; margin: 26px 0 12px; }
.velo-dash-breakdown { display: flex; flex-wrap: wrap; gap: 10px 22px; background: #fff; border: 1px solid #dcdcdc; border-radius: 10px; padding: 14px 18px; }
.velo-dash-breakrow { display: flex; align-items: center; gap: 10px; }
.velo-dash-breakrow strong { color: #0f2a4a; }

/* ================================================================ Messages */
.velo-msg-card { background: #fff; border: 1px solid #dcdcdc; border-left: 4px solid #cbd5e1; border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.velo-msg-card.is-unread { border-left-color: #0e8691; background: #fbfefe; }
.velo-msg-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.velo-msg-meta { font-size: 12px; color: #94a3b8; margin-left: 8px; }
.velo-msg-actions { display: flex; gap: 6px; }
.velo-new-pill { background: #0e8691; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 999px; margin-left: 8px; text-transform: uppercase; }
.velo-msg-subject { font-weight: 700; color: #0f2a4a; margin-top: 8px; }
.velo-msg-body { margin: 6px 0 0; color: #475569; font-size: 13.5px; white-space: pre-wrap; }