/*
 * Top Entrega Max — Public Styles
 * Mobile-first, SaaS moderno
 */

/* ============================================================
   FONT IMPORT & VARIABLES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
	--tem-bg:          #0d0f14;
	--tem-bg-2:        #13161e;
	--tem-bg-3:        #1a1e2a;
	--tem-border:      #252a38;
	--tem-border-2:    #2e3446;
	--tem-accent:      #3b82f6;
	--tem-accent-2:    #6366f1;
	--tem-accent-glow: rgba(59,130,246,.15);
	--tem-green:       #22c55e;
	--tem-yellow:      #f59e0b;
	--tem-red:         #ef4444;
	--tem-text:        #e2e8f0;
	--tem-text-2:      #94a3b8;
	--tem-text-3:      #64748b;
	--tem-radius:      14px;
	--tem-radius-sm:   8px;
	--tem-shadow:      0 8px 40px rgba(0,0,0,.45);
	--tem-font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   WRAPPER
   ============================================================ */
.tem-wrap {
	font-family: var(--tem-font);
	background: var(--tem-bg);
	border: 1px solid var(--tem-border);
	border-radius: var(--tem-radius);
	padding: 28px 24px;
	max-width: 680px;
	margin: 0 auto;
	color: var(--tem-text);
	box-shadow: var(--tem-shadow);
	position: relative;
	overflow: hidden;
}

.tem-wrap::before {
	content: '';
	position: absolute;
	top: -80px;
	right: -80px;
	width: 280px;
	height: 280px;
	background: radial-gradient(circle, rgba(59,130,246,.08) 0%, transparent 70%);
	pointer-events: none;
}

/* ============================================================
   STEPPER
   ============================================================ */
.tem-stepper {
	display: flex;
	align-items: center;
	gap: 0;
	margin-bottom: 32px;
}

.tem-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 0;
}

.tem-step-dot {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	background: var(--tem-bg-3);
	border: 2px solid var(--tem-border-2);
	color: var(--tem-text-3);
	transition: all .3s ease;
}

.tem-step span {
	font-size: 10px;
	color: var(--tem-text-3);
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: .5px;
	font-weight: 500;
}

.tem-step.active .tem-step-dot {
	background: var(--tem-accent);
	border-color: var(--tem-accent);
	color: #fff;
	box-shadow: 0 0 0 4px var(--tem-accent-glow);
}

.tem-step.active span { color: var(--tem-accent); }

.tem-step.done .tem-step-dot {
	background: var(--tem-green);
	border-color: var(--tem-green);
	color: #fff;
}

.tem-step.done span { color: var(--tem-green); }

.tem-step-line {
	flex: 1;
	height: 2px;
	background: var(--tem-border-2);
	margin-bottom: 16px;
	min-width: 16px;
}

/* ============================================================
   FORM STEP
   ============================================================ */
.tem-form-step h3 {
	font-size: 17px;
	font-weight: 700;
	color: var(--tem-text);
	margin: 0 0 20px;
}

.tem-field-group {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 20px;
}

.tem-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tem-field label {
	font-size: 12px;
	font-weight: 600;
	color: var(--tem-text-2);
	text-transform: uppercase;
	letter-spacing: .5px;
}

.tem-req { color: var(--tem-red); }

.tem-field-input {
	background: var(--tem-bg-3);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	color: var(--tem-text);
	font-family: var(--tem-font);
	font-size: 14px;
	padding: 11px 14px;
	outline: none;
	width: 100%;
	box-sizing: border-box;
	transition: border .2s, box-shadow .2s;
	-webkit-appearance: none;
}

.tem-field-input:focus {
	border-color: var(--tem-accent);
	box-shadow: 0 0 0 3px var(--tem-accent-glow);
}

.tem-field-input::placeholder { color: var(--tem-text-3); }

.tem-field-input-sm { width: auto; font-size: 13px; padding: 8px 12px; }

.tem-field-note {
	font-size: 11px;
	color: var(--tem-text-3);
	margin-top: 2px;
}

/* ============================================================
   VEHICLES GRID
   ============================================================ */
.tem-vehicles-label {
	font-size: 12px;
	font-weight: 600;
	color: var(--tem-text-2);
	text-transform: uppercase;
	letter-spacing: .5px;
	margin-bottom: 12px;
}

.tem-vehicles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 10px;
	margin-bottom: 20px;
}

.tem-vehicle-card {
	cursor: pointer;
}

.tem-vehicle-radio {
	display: none;
}

.tem-vehicle-card-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 10px;
	background: var(--tem-bg-3);
	border: 2px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	transition: all .2s ease;
	text-align: center;
}

.tem-vehicle-card-inner:hover {
	border-color: rgba(59,130,246,.4);
	background: rgba(59,130,246,.04);
}

.tem-vehicle-radio:checked + .tem-vehicle-card-inner {
	border-color: var(--tem-accent);
	background: var(--tem-accent-glow);
	box-shadow: 0 0 0 3px var(--tem-accent-glow);
}

.tem-vehicle-icon { font-size: 28px; line-height: 1; }
.tem-vehicle-name { font-size: 13px; font-weight: 600; color: var(--tem-text); }

.tem-vehicle-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 11px;
	color: var(--tem-text-3);
}

/* ============================================================
   CTA BUTTONS
   ============================================================ */
.tem-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 24px;
	background: var(--tem-accent);
	color: #fff;
	border: none;
	border-radius: var(--tem-radius-sm);
	font-family: var(--tem-font);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
	letter-spacing: -.1px;
	text-decoration: none;
}

.tem-cta:hover {
	background: #2563eb;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(59,130,246,.35);
}

.tem-cta:active { transform: translateY(0); }

.tem-cta-sm { padding: 8px 16px; font-size: 13px; }

.tem-cta-ghost {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 18px;
	background: transparent;
	color: var(--tem-text-2);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	font-family: var(--tem-font);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all .2s;
}

.tem-cta-ghost:hover {
	border-color: var(--tem-text-3);
	color: var(--tem-text);
}

/* ============================================================
   STEP ACTIONS
   ============================================================ */
.tem-step-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 8px;
}

/* ============================================================
   RESULT BOX
   ============================================================ */
.tem-result-box {
	background: linear-gradient(135deg, rgba(59,130,246,.08), rgba(99,102,241,.08));
	border: 1px solid rgba(59,130,246,.25);
	border-radius: var(--tem-radius);
	padding: 20px;
	margin-top: 20px;
	animation: tem-fade-in .3s ease;
}

.tem-result-row {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.tem-result-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.tem-result-label {
	font-size: 11px;
	color: var(--tem-text-3);
	text-transform: uppercase;
	letter-spacing: .5px;
	font-weight: 600;
}

.tem-result-value {
	font-size: 20px;
	font-weight: 800;
	color: var(--tem-text);
}

.tem-result-hint {
	font-size: 10px;
	color: var(--tem-text-3);
	text-transform: uppercase;
	letter-spacing: .4px;
	margin-top: 2px;
}

.tem-result-value-price {
	font-size: 28px;
	color: var(--tem-green);
}

.tem-breakdown-line {
	font-size: 12px;
	color: var(--tem-text-3);
	background: rgba(255,255,255,.03);
	border: 1px solid var(--tem-border);
	border-radius: var(--tem-radius-sm);
	padding: 8px 12px;
	margin-bottom: 14px;
	line-height: 1.6;
}

.tem-result-divider {
	width: 1px;
	height: 40px;
	background: var(--tem-border-2);
	flex-shrink: 0;
}

/* ============================================================
   ERROR BOX
   ============================================================ */
.tem-error-box {
	background: rgba(239,68,68,.12);
	border: 1px solid rgba(239,68,68,.3);
	border-radius: var(--tem-radius-sm);
	padding: 12px 16px;
	color: #fca5a5;
	font-size: 13px;
	margin-top: 12px;
	animation: tem-fade-in .2s ease;
}

/* ============================================================
   SUCCESS BOX
   ============================================================ */
.tem-success-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	text-align: center;
}

.tem-success-icon {
	font-size: 56px;
	margin-bottom: 16px;
	animation: tem-bounce .5s ease;
}

.tem-success-box h3 {
	font-size: 18px;
	font-weight: 700;
	color: var(--tem-text);
	margin: 0 0 8px;
}

.tem-success-box p {
	font-size: 14px;
	color: var(--tem-text-3);
	margin: 0 0 20px;
}

/* Spinner */
.tem-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--tem-border-2);
	border-top-color: var(--tem-accent);
	border-radius: 50%;
	animation: tem-spin .8s linear infinite;
}

/* ============================================================
   LIST TABLE (shortcode lista)
   ============================================================ */
.tem-list-wrap {
	max-width: 100%;
}

.tem-list-filters { margin-bottom: 20px; }

.tem-list-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.tem-list-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tem-list-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.tem-list-table th {
	background: var(--tem-bg-3);
	color: var(--tem-text-3);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .5px;
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--tem-border);
	white-space: nowrap;
}

.tem-list-table td {
	padding: 12px 12px;
	border-bottom: 1px solid var(--tem-border);
	color: var(--tem-text);
	vertical-align: middle;
	font-size: 13px;
}

.tem-list-table td small {
	font-size: 11px;
	color: var(--tem-text-3);
	display: block;
	margin-top: 2px;
}

.tem-list-table tr:last-child td { border-bottom: none; }
.tem-list-table tr:hover td { background: rgba(255,255,255,.02); }

.tem-pub-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
}

.tem-pub-badge-pending   { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.tem-pub-badge-paid      { background: rgba(34,197,94,.15);  color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.tem-pub-badge-delivered { background: rgba(168,85,247,.15); color: #a855f7; border: 1px solid rgba(168,85,247,.3); }
.tem-pub-badge-cancelled { background: rgba(239,68,68,.15);  color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

.tem-pub-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 50px 20px;
	color: var(--tem-text-3);
	font-size: 14px;
	gap: 10px;
}

.tem-pub-empty span { font-size: 48px; opacity: .5; }

/* ============================================================
   POWERED BY
   ============================================================ */
.tem-powered {
	text-align: center;
	font-size: 11px;
	color: var(--tem-text-3);
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--tem-border);
}

.tem-powered a {
	color: var(--tem-accent);
	text-decoration: none;
	font-weight: 600;
}

.tem-powered a:hover { text-decoration: underline; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes tem-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes tem-spin {
	to { transform: rotate(360deg); }
}

@keyframes tem-bounce {
	0%   { transform: scale(0); }
	60%  { transform: scale(1.2); }
	100% { transform: scale(1); }
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (min-width: 600px) {
	.tem-field-group {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	.tem-field:only-child,
	.tem-field:first-child:nth-last-child(odd) {
		grid-column: 1 / -1;
	}
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 480px) {
	.tem-wrap { padding: 20px 16px; border-radius: 10px; }

	.tem-stepper { gap: 0; }
	.tem-step-dot { width: 26px; height: 26px; font-size: 11px; }
	.tem-step span { font-size: 9px; }

	.tem-vehicles-grid { grid-template-columns: repeat(2, 1fr); }

	.tem-result-value { font-size: 17px; }
	.tem-result-value-price { font-size: 24px; }

	.tem-step-actions { flex-direction: column; }
	.tem-cta, .tem-cta-ghost { width: 100%; justify-content: center; }

	.tem-list-filter-form { flex-direction: column; align-items: stretch; }
	.tem-list-filter-form .tem-field-input-sm { width: 100%; }
}

/* ============================================================
   PAYMENT CARDS
   ============================================================ */
.tem-payment-section { margin-bottom: 20px; }

.tem-payment-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 10px;
}

.tem-payment-card { cursor: pointer; }
.tem-payment-radio { display: none; }

.tem-payment-card-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 20px 14px;
	background: var(--tem-bg-3);
	border: 2px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	transition: all .2s ease;
	text-align: center;
}

.tem-payment-card-inner:hover { border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.04); }

.tem-payment-radio:checked + .tem-payment-card-inner {
	border-color: var(--tem-accent);
	background: var(--tem-accent-glow);
	box-shadow: 0 0 0 3px var(--tem-accent-glow);
}

.tem-payment-icon { font-size: 32px; }
.tem-payment-name { font-size: 14px; font-weight: 700; color: var(--tem-text); }
.tem-payment-desc { font-size: 12px; color: var(--tem-text-3); line-height: 1.4; }

/* ============================================================
   CONFIRMATION SCREEN
   ============================================================ */
.tem-confirm-box {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.tem-confirm-header {
	text-align: center;
	padding: 20px 0 8px;
}

.tem-confirm-icon { font-size: 52px; margin-bottom: 10px; animation: tem-bounce .5s ease; }
.tem-confirm-header h3 { font-size: 18px; font-weight: 700; color: var(--tem-text); margin: 0 0 6px; }
.tem-confirm-header p { font-size: 14px; color: var(--tem-text-3); margin: 0; }

.tem-confirm-card {
	background: var(--tem-bg-3);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius);
	padding: 20px;
}

.tem-confirm-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.tem-confirm-full { grid-column: 1 / -1; }

.tem-confirm-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.tem-ci-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--tem-text-3);
	text-transform: uppercase;
	letter-spacing: .5px;
}

.tem-ci-value {
	font-size: 13px;
	font-weight: 500;
	color: var(--tem-text);
	word-break: break-word;
}

.tem-ci-price {
	font-size: 20px;
	font-weight: 800;
	color: var(--tem-green);
}

.tem-confirm-actions {
	display: flex;
	justify-content: center;
}

/* ============================================================
   PUBLIC MODAL (lista)
   ============================================================ */
.tem-pub-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tem-pub-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.7);
	backdrop-filter: blur(4px);
}

.tem-pub-modal-box {
	position: relative;
	z-index: 1;
	background: var(--tem-bg-2);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius);
	width: 92%;
	max-width: 560px;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.tem-pub-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--tem-border);
}

.tem-pub-modal-header h3 {
	font-size: 14px;
	font-weight: 600;
	color: var(--tem-text);
	margin: 0;
}

.tem-pub-modal-close {
	background: transparent;
	border: none;
	color: var(--tem-text-3);
	cursor: pointer;
	font-size: 18px;
	padding: 4px;
	line-height: 1;
}

.tem-pub-modal-close:hover { color: var(--tem-text); }

.tem-pub-modal-body { padding: 20px; }

.tem-pub-modal-footer {
	padding: 14px 20px;
	border-top: 1px solid var(--tem-border);
	display: flex;
	justify-content: flex-end;
}

/* ============================================================
   ADMIN SLOT ROWS
   ============================================================ */
.tem-slot-row {
	background: var(--tem-bg);
	border: 1px solid var(--tem-border);
	border-radius: var(--tem-radius-sm);
	padding: 10px 12px;
	margin-bottom: 6px;
}

.tem-slot-fields {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.tem-slot-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tem-slot-field label {
	font-size: 10px;
	color: var(--tem-text-3);
	text-transform: uppercase;
	letter-spacing: .4px;
	font-weight: 600;
}

@media (max-width: 480px) {
	.tem-payment-grid { grid-template-columns: 1fr; }
	.tem-confirm-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   GEOLOCALIZAÇÃO
   ============================================================ */
.tem-location-box {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	background: var(--tem-bg-3);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	padding: 12px 14px;
	margin-bottom: 16px;
}
.tem-location-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; }
.tem-location-icon { font-size: 18px; }
#tem-location-text { font-size: 12px; color: var(--tem-text-3); }

/* ============================================================
   ADDONS (ajudante + tempo extra)
   ============================================================ */
.tem-addons-section { margin-bottom: 20px; }
.tem-addons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.tem-addon-card { cursor: pointer; }
.tem-addon-check { display: none; }
.tem-addon-inner {
	display: flex; gap: 12px; align-items: flex-start;
	background: var(--tem-bg-3); border: 2px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm); padding: 14px; transition: all .2s;
}
.tem-addon-card.active .tem-addon-inner,
.tem-addon-check:checked + .tem-addon-inner { border-color: var(--tem-accent); background: var(--tem-accent-glow); }
.tem-addon-icon { font-size: 26px; flex-shrink: 0; }
.tem-addon-name { font-size: 13px; font-weight: 600; color: var(--tem-text); margin-bottom: 2px; }
.tem-addon-desc { font-size: 11px; color: var(--tem-text-3); margin-bottom: 6px; }
.tem-addon-price { font-size: 13px; font-weight: 700; color: var(--tem-green); }
.tem-extra-time-card .tem-addon-inner { cursor: default; }
.tem-extra-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tem-qty-btn {
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--tem-bg-2); border: 1px solid var(--tem-border-2);
	color: var(--tem-text); font-size: 16px; font-weight: 700;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: all .2s; line-height: 1;
}
.tem-qty-btn:hover { background: var(--tem-accent); border-color: var(--tem-accent); color: #fff; }
#tem-extra-display { font-size: 13px; font-weight: 600; color: var(--tem-text); min-width: 50px; text-align: center; }

/* ============================================================
   PAYMENT GRID 4 colunas
   ============================================================ */
.tem-payment-grid-4 { grid-template-columns: repeat(4,1fr); }
.tem-payment-grid-4 .tem-payment-desc { display: none; }
.tem-payment-grid-4 .tem-payment-card-inner { padding: 14px 8px; }

/* ============================================================
   DRIVER SHORTCODE
   ============================================================ */
.tem-driver-wrap { max-width: 700px; margin: 0 auto; }
.tem-driver-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.tem-driver-header h2 { font-size: 18px; font-weight: 700; color: var(--tem-text); margin: 0; }
.tem-driver-filter { display: flex; gap: 8px; align-items: center; }
.tem-driver-list { display: flex; flex-direction: column; gap: 16px; }

.tem-driver-card {
	background: var(--tem-bg-2); border: 1px solid var(--tem-border);
	border-radius: var(--tem-radius); padding: 18px; transition: var(--tem-transition);
}
.tem-driver-card:hover { border-color: var(--tem-border-2); }

.tem-driver-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tem-driver-id { font-size: 13px; font-weight: 700; color: var(--tem-text-3); font-family: var(--tem-mono); }
.tem-driver-time { font-size: 16px; font-weight: 800; color: var(--tem-accent); }

.tem-driver-status-badge {
	padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.tem-ds- { background: rgba(100,116,139,.15); color: var(--tem-text-3); border: 1px solid rgba(100,116,139,.3); }
.tem-ds-heading_collect { background: rgba(245,158,11,.15); color: var(--tem-yellow); border: 1px solid rgba(245,158,11,.3); }
.tem-ds-collected      { background: rgba(59,130,246,.15);  color: var(--tem-accent); border: 1px solid rgba(59,130,246,.3); }
.tem-ds-in_transit     { background: rgba(168,85,247,.15);  color: var(--tem-purple); border: 1px solid rgba(168,85,247,.3); }
.tem-ds-delivered      { background: rgba(34,197,94,.15);   color: var(--tem-green);  border: 1px solid rgba(34,197,94,.3); }

.tem-driver-route { margin-bottom: 10px; }
.tem-driver-route div { font-size: 13px; color: var(--tem-text-2); margin-bottom: 4px; }

.tem-driver-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tem-driver-meta span { font-size: 12px; color: var(--tem-text-3); background: var(--tem-bg-3); padding: 3px 8px; border-radius: 4px; }

.tem-driver-label { font-size: 11px; font-weight: 600; color: var(--tem-text-3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }

.tem-driver-status-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tem-ds-btn {
	padding: 6px 12px; border-radius: var(--tem-radius-sm);
	font-size: 12px; font-weight: 500; cursor: pointer;
	background: var(--tem-bg-3); border: 1px solid var(--tem-border-2);
	color: var(--tem-text-2); transition: all .2s; font-family: var(--tem-font);
}
.tem-ds-btn:hover { border-color: var(--tem-accent); color: var(--tem-accent); }
.tem-ds-btn.active { background: var(--tem-accent); border-color: var(--tem-accent); color: #fff; }

.tem-driver-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.tem-photo-section { display: flex; flex-direction: column; gap: 8px; }
.tem-photo-label { font-size: 12px; font-weight: 600; color: var(--tem-text-2); }
.tem-photo-thumb { width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--tem-radius-sm); border: 1px solid var(--tem-border); }
.tem-photo-empty { background: var(--tem-bg-3); border: 1px dashed var(--tem-border-2); border-radius: var(--tem-radius-sm); padding: 20px; text-align: center; font-size: 12px; color: var(--tem-text-3); }
.tem-photo-upload-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tem-photo-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tem-text-3); }
.tem-spinner-sm { width: 16px; height: 16px; border: 2px solid var(--tem-border-2); border-top-color: var(--tem-accent); border-radius: 50%; animation: tem-spin .7s linear infinite; }

.tem-driver-card-msg { padding: 8px 12px; border-radius: var(--tem-radius-sm); font-size: 12px; font-weight: 600; margin-top: 4px; }
.tem-driver-actions { margin-bottom: 14px; }

@media(max-width:480px){
	.tem-addons-grid { grid-template-columns: 1fr; }
	.tem-payment-grid-4 { grid-template-columns: repeat(2,1fr); }
	.tem-driver-photos { grid-template-columns: 1fr; }
}

/* ============================================================
   VEHICLE CARD — apenas peso
   ============================================================ */
.tem-vehicle-weight {
	font-size: 12px;
	font-weight: 600;
	color: var(--tem-accent);
	background: rgba(59,130,246,.1);
	border-radius: 20px;
	padding: 2px 10px;
	margin-top: 2px;
}

/* Remove display das meta antigas */
.tem-vehicle-meta { display: none; }

/* ============================================================
   CALENDÁRIO CUSTOMIZADO
   ============================================================ */
.tem-calendar-section { margin-bottom: 22px; }

.tem-calendar-wrap {
	background: var(--tem-bg-3);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius);
	overflow: hidden;
	user-select: none;
}

.tem-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--tem-bg-2);
	border-bottom: 1px solid var(--tem-border);
}

.tem-cal-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--tem-text);
	letter-spacing: .3px;
}

.tem-cal-nav-btn {
	width: 32px;
	height: 32px;
	background: var(--tem-bg-3);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	color: var(--tem-text-2);
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .2s;
	line-height: 1;
	font-family: var(--tem-font);
}

.tem-cal-nav-btn:hover {
	background: var(--tem-accent);
	border-color: var(--tem-accent);
	color: #fff;
}

.tem-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0;
	padding: 10px 10px 4px;
}

.tem-cal-dow {
	font-size: 10px;
	font-weight: 700;
	color: var(--tem-text-3);
	text-transform: uppercase;
	text-align: center;
	padding: 4px 0 8px;
	letter-spacing: .5px;
}

.tem-calendar-days {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	padding: 0 10px 12px;
}

.tem-cal-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--tem-radius-sm);
	font-size: 13px;
	font-weight: 500;
	transition: all .15s ease;
	position: relative;
}

.tem-cal-empty {
	pointer-events: none;
}

.tem-cal-unavailable {
	color: var(--tem-text-3);
	opacity: .4;
	cursor: not-allowed;
}

.tem-cal-available {
	color: var(--tem-text);
	cursor: pointer;
	background: var(--tem-bg-2);
	border: 1px solid var(--tem-border);
	font-weight: 600;
}

.tem-cal-available:hover {
	background: rgba(59,130,246,.15);
	border-color: var(--tem-accent);
	color: var(--tem-accent);
	transform: scale(1.06);
}

.tem-cal-selected {
	background: var(--tem-accent) !important;
	border-color: var(--tem-accent) !important;
	color: #fff !important;
	box-shadow: 0 0 0 3px var(--tem-accent-glow);
	font-weight: 700;
}

/* ============================================================
   GRID DE HORÁRIOS
   ============================================================ */
.tem-timeslot-section {
	margin-bottom: 22px;
	animation: tem-fade-in .25s ease;
}

.tem-timeslot-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 8px;
	margin-top: 10px;
}

.tem-timeslot-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 10px 8px;
	background: var(--tem-bg-3);
	border: 2px solid var(--tem-border-2);
	border-radius: var(--tem-radius-sm);
	cursor: pointer;
	transition: all .2s ease;
	font-family: var(--tem-font);
}

.tem-timeslot-btn:hover {
	border-color: var(--tem-accent);
	background: rgba(59,130,246,.06);
}

.tem-timeslot-btn.active {
	border-color: var(--tem-accent);
	background: var(--tem-accent-glow);
	box-shadow: 0 0 0 3px var(--tem-accent-glow);
}

.tem-slot-time {
	font-size: 14px;
	font-weight: 700;
	color: var(--tem-text);
}

.tem-timeslot-btn.active .tem-slot-time {
	color: var(--tem-accent);
}

.tem-slot-vagas {
	font-size: 10px;
	color: var(--tem-text-3);
	font-weight: 500;
}

.tem-timeslot-btn.active .tem-slot-vagas {
	color: var(--tem-accent);
	opacity: .8;
}

.tem-slots-loading,
.tem-slots-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 20px;
	font-size: 13px;
	color: var(--tem-text-3);
}

/* ============================================================
   DRIVER CARD FOOTER
   ============================================================ */
.tem-driver-card-footer {
	padding-top: 10px;
	border-top: 1px solid var(--tem-border);
	margin-top: 4px;
	display: flex;
	justify-content: flex-end;
}

/* ============================================================
   MAPA OSM — PAINEL DO MOTORISTA
   ============================================================ */
.tem-driver-map-section {
	margin-bottom: 24px;
	background: var(--tem-bg-2);
	border: 1px solid var(--tem-border-2);
	border-radius: var(--tem-radius);
	overflow: hidden;
}

.tem-driver-map-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	border-bottom: 1px solid var(--tem-border);
}

.tem-driver-map-header h3 {
	font-size: 14px;
	font-weight: 700;
	color: var(--tem-text);
	margin: 0;
}

.tem-driver-map {
	width: 100%;
	height: 320px;
	z-index: 1;
}

/* Força o Leaflet a renderizar corretamente em dark mode */
.tem-driver-map .leaflet-container {
	background: #1e293b;
}

.tem-map-legend {
	display: flex;
	gap: 16px;
	padding: 10px 18px;
	border-top: 1px solid var(--tem-border);
}

.tem-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--tem-text-3);
}

.tem-legend-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}

.tem-legend-origin { background: #3b82f6; }
.tem-legend-dest   { background: #10b981; }

/* Pins do mapa */
.tem-map-pin {
	font-size: 28px;
	line-height: 1;
	filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
	cursor: pointer;
	transition: transform .15s;
}

.tem-map-pin:hover { transform: scale(1.2); }

/* Popup do mapa */
.tem-map-popup {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-size: 13px;
	min-width: 220px;
	max-width: 280px;
}

.tem-map-popup-id {
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: .5px;
	margin-bottom: 4px;
}

.tem-map-popup-label {
	font-size: 14px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 8px;
	border-bottom: 1px solid #e2e8f0;
	padding-bottom: 6px;
}

.tem-map-popup-row {
	font-size: 12px;
	color: #475569;
	margin-bottom: 4px;
	line-height: 1.4;
}

.tem-map-popup-actions {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid #e2e8f0;
}

.tem-waze-btn-popup {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #33ccff;
	color: #000 !important;
	text-decoration: none !important;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	transition: opacity .2s;
}

.tem-waze-btn-popup:hover { opacity: .85; }

/* ============================================================
   ROTA COM BOTÕES WAZE — cards do motorista
   ============================================================ */
.tem-driver-route-waze {
	background: var(--tem-bg-3);
	border: 1px solid var(--tem-border);
	border-radius: var(--tem-radius-sm);
	padding: 12px 14px;
	margin-bottom: 12px;
}

.tem-route-waze-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.tem-route-waze-info {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.tem-route-waze-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.tem-route-waze-addr {
	font-size: 12px;
	color: var(--tem-text-2);
	line-height: 1.4;
	word-break: break-word;
}

.tem-route-waze-divider {
	height: 1px;
	background: var(--tem-border);
	margin: 10px 0;
}

.tem-waze-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #33ccff;
	color: #000 !important;
	text-decoration: none !important;
	padding: 6px 10px;
	border-radius: var(--tem-radius-sm);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	flex-shrink: 0;
	transition: opacity .2s, transform .15s;
	border: none;
	cursor: pointer;
	font-family: var(--tem-font);
}

.tem-waze-btn:hover { opacity: .88; transform: scale(1.03); }

.tem-waze-icon {
	width: 16px;
	height: 16px;
	border-radius: 3px;
	object-fit: contain;
}

@media(max-width:480px){
	.tem-route-waze-row { flex-direction: column; align-items: flex-start; }
	.tem-waze-btn { align-self: flex-end; }
}
