:root {
	--se-green: #16a34a;
	--se-green-dark: #12833c;
	--se-green-soft: #eafaf0;
	--se-text: #111827;
	--se-muted: #6b7280;
	--se-line: #e5e7eb;
	--se-radius: 12px;
}

.se-wrap { color: var(--se-text); font-size: 15px; }
.se-wrap * { box-sizing: border-box; }
.se-title { font-size: 28px; font-weight: 700; margin: 0 0 14px; }
.se-muted { color: var(--se-muted); font-size: 13px; }
.se-label { color: var(--se-muted); font-size: 12px; display: block; margin-bottom: 4px; }
.se-strong { font-weight: 600; }
.se-dash-hint { color: var(--se-muted); }

/* Tabs */
.se-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--se-line); margin-bottom: 18px; }
.se-tab { padding: 10px 14px; white-space: nowrap; text-decoration: none; color: var(--se-muted); font-weight: 500; border-bottom: 2px solid transparent; }
.se-tab.is-active { color: var(--se-green); border-bottom-color: var(--se-green); }

/* Layout */
.se-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.se-card { background: #fff; border: 1px solid var(--se-line); border-radius: var(--se-radius); padding: 16px; margin-bottom: 16px; }

/* Order card */
.se-order-grid { display: grid; grid-template-columns: 88px minmax(0,1.6fr) 1fr 1fr 1fr; gap: 14px; align-items: center; }
.se-order-thumb img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; background: #f6f7f8; }
.se-order-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.se-order-no { font-size: 15px; }
.se-prod { font-weight: 600; }
.se-order-total .se-strong { font-size: 17px; }

.se-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.se-b-green { background: var(--se-green-soft); color: var(--se-green-dark); }
.se-b-amber { background: #fef3c7; color: #92400e; }
.se-b-blue  { background: #e0f2fe; color: #075985; }
.se-b-grey  { background: #f1f5f9; color: #475569; }
.se-b-red   { background: #fee2e2; color: #b91c1c; }

/* Buttons */
.se-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--se-line); }
.se-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid var(--se-line); background: #fff; color: var(--se-text); line-height: 1.2; }
.se-btn:hover { background: #f8fafc; }
.se-btn-primary { background: var(--se-green); border-color: var(--se-green); color: #fff; width: 100%; }
.se-btn-primary:hover { background: var(--se-green-dark); color: #fff; }
.se-btn-ghost { border-color: var(--se-green); color: var(--se-green); background: var(--se-green-soft); }
.se-btn-danger { border-color: #fecaca; color: #b91c1c; }
.se-block { width: 100%; margin-bottom: 8px; }

/* Sidebar */
.se-side h3 { font-size: 16px; margin: 0 0 8px; }
.se-track-box p, .se-help-box p { color: var(--se-muted); font-size: 13px; }
.se-track-box input { width: 100%; padding: 10px 12px; border: 1px solid var(--se-line); border-radius: 10px; margin-bottom: 10px; }
.se-help-box { background: var(--se-green-soft); border-color: #cdeedb; }

/* Pagination + empty */
.se-pager { display: flex; gap: 6px; justify-content: center; margin: 18px 0; }
.se-page { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--se-line); border-radius: 8px; text-decoration: none; color: var(--se-text); }
.se-page.is-active { background: var(--se-green); border-color: var(--se-green); color: #fff; }
.se-empty { padding: 40px; text-align: center; color: var(--se-muted); border: 1px dashed var(--se-line); border-radius: var(--se-radius); }

/* Modal */
.se-modal { position: fixed; inset: 0; display: none; z-index: 99999; }
.se-modal.is-open { display: block; }
.se-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); }
.se-modal-box { position: relative; margin: 4vh auto; max-width: 820px; width: calc(100% - 24px); max-height: 92vh; overflow: auto; background: #fff; border-radius: 16px; }
.se-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--se-line); position: sticky; top: 0; background: #fff; border-radius: 16px 16px 0 0; }
.se-modal-head h3 { margin: 0; font-size: 19px; }
.se-modal-x { border: 0; background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--se-muted); }
.se-modal-body { padding: 20px; }
.se-loading { padding: 40px; text-align: center; color: var(--se-muted); }

/* Track modal content */
.se-tm-top { display: grid; grid-template-columns: 110px minmax(0,1fr) 220px; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--se-line); }
.se-tm-thumb img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; background: #f6f7f8; }
.se-tm-meta { display: flex; flex-direction: column; gap: 4px; }
.se-tm-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.se-tm-trackrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.se-tm-h { font-size: 16px; margin: 18px 0 10px; }

.se-timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; position: relative; }
.se-step { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.se-step:not(:last-child)::after { content: ""; position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: var(--se-line); z-index: 0; }
.se-step.is-done:not(:last-child)::after { background: var(--se-green); }
.se-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--se-line); background: #fff; z-index: 1; }
.se-step.is-done .se-dot { border-color: var(--se-green); background: var(--se-green-soft); }
.se-step-label { font-weight: 600; font-size: 13px; }

.se-note { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: var(--se-green-soft); color: var(--se-green-dark); }
.se-tm-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 8px; }
.se-addr { color: var(--se-muted); font-size: 14px; line-height: 1.6; }

/* Responsive */
@media (max-width: 1024px) {
	.se-layout { grid-template-columns: 1fr; }
	.se-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 782px) {
	.se-title { font-size: 22px; }
	.se-order-grid { grid-template-columns: 72px minmax(0,1fr); gap: 12px; }
	.se-order-thumb img { width: 68px; height: 68px; }
	.se-order-col { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed var(--se-line); padding-top: 8px; }
	.se-order-col .se-label { margin: 0; }
	.se-actions .se-btn { flex: 1 1 46%; }
	.se-side { grid-template-columns: 1fr; }
	.se-tm-top { grid-template-columns: 80px minmax(0,1fr); }
	.se-tm-track { grid-column: 1 / -1; }
	.se-tm-thumb img { width: 76px; height: 76px; }
	.se-timeline { grid-template-columns: 1fr; text-align: left; }
	.se-step { flex-direction: row; align-items: center; gap: 10px; }
	.se-step:not(:last-child)::after { display: none; }
	.se-tm-bottom { grid-template-columns: 1fr; }
	.se-modal-box { margin: 0; width: 100%; max-width: none; min-height: 100vh; border-radius: 0; }
	.se-modal-head { border-radius: 0; }
}
