/* My Orders page styles */
.container { max-width: 780px; margin: 0 auto; padding: 32px 24px 60px; }
.page-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }

/* Filter bar */
.filter-bar {
	display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-search {
	flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--gray-200);
	border-radius: var(--radius); font-size: 14px; background: white;
}
.filter-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }
.filter-select {
	padding: 8px 12px; border: 1px solid var(--gray-200); border-radius: var(--radius);
	font-size: 14px; background: white; cursor: pointer; min-width: 130px;
}

/* Form group sections */
.form-group-section { margin-bottom: 32px; }
.form-group-title {
	font-size: 18px; font-weight: 600; color: var(--gray-700);
	margin-bottom: 12px; padding-bottom: 8px;
	border-bottom: 1px solid var(--gray-200);
}

/* Order cards */
.my-order-card {
	background: white;
	border: 1px solid var(--gray-200);
	border-radius: var(--radius-lg);
	margin-bottom: 10px;
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: box-shadow 0.15s;
}
.my-order-card:hover { box-shadow: var(--shadow-lg); }

/* Status left border */
.my-order-card.status-pending { border-left: 3px solid #f59e0b; }
.my-order-card.status-confirmed { border-left: 3px solid #3b82f6; }
.my-order-card.status-shipped { border-left: 3px solid #8b5cf6; }
.my-order-card.status-delivered { border-left: 3px solid #10b981; }
.my-order-card.status-cancelled { border-left: 3px solid #ef4444; }

.my-order-summary {
	padding: 16px 20px; cursor: pointer; user-select: none;
}
.my-order-header {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 6px;
}
.my-order-date { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.my-order-items {
	font-size: 13px; color: var(--gray-500); line-height: 1.5;
	margin-bottom: 8px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.my-order-footer {
	display: flex; justify-content: space-between; align-items: center;
	padding-top: 8px; border-top: 1px solid var(--gray-100);
}
.my-order-total { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.my-order-meta {
	display: flex; align-items: center; gap: 10px;
}
.my-order-id { font-size: 12px; color: var(--gray-400); font-family: monospace; }
.my-order-expand {
	font-size: 18px; color: var(--gray-400); transition: transform 0.2s;
	line-height: 1;
}
.my-order-card.expanded .my-order-expand { transform: rotate(180deg); }

/* Detail view */
.my-order-detail {
	display: none; padding: 0 20px 20px;
	border-top: 1px solid var(--gray-100);
}
.my-order-card.expanded .my-order-detail { display: block; }

/* Status progress bar */
.status-progress {
	display: flex; align-items: center; justify-content: space-between;
	margin: 16px 0 20px; position: relative;
}
.status-progress::before {
	content: ''; position: absolute; top: 14px; left: 24px; right: 24px;
	height: 3px; background: var(--gray-200); z-index: 0;
}
.status-step {
	display: flex; flex-direction: column; align-items: center;
	position: relative; z-index: 1; flex: 1;
}
.status-dot {
	width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gray-200);
	background: white; display: flex; align-items: center; justify-content: center;
	font-size: 12px; margin-bottom: 6px; transition: all 0.2s;
}
.status-step.active .status-dot {
	border-color: var(--primary); background: var(--primary); color: white;
}
.status-step.completed .status-dot {
	border-color: #10b981; background: #10b981; color: white;
}
.status-step-label {
	font-size: 11px; color: var(--gray-400); text-align: center;
}
.status-step.active .status-step-label,
.status-step.completed .status-step-label { color: var(--gray-700); font-weight: 600; }

/* Cancelled state */
.status-progress.cancelled .status-step .status-dot {
	border-color: var(--gray-200); background: white; color: var(--gray-300);
}
.status-progress.cancelled .status-step.cancelled-step .status-dot {
	border-color: #ef4444; background: #ef4444; color: white;
}

/* Tracking section */
.tracking-section {
	background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius);
	padding: 12px 16px; margin-bottom: 16px;
}
.tracking-label { font-size: 12px; font-weight: 600; color: #15803d; margin-bottom: 4px; }
.tracking-number {
	font-size: 15px; font-weight: 700; font-family: monospace; color: #166534;
	word-break: break-all;
}
.tracking-link {
	display: inline-block; margin-top: 6px; font-size: 13px; color: var(--primary);
	text-decoration: none; font-weight: 500;
}
.tracking-link:hover { text-decoration: underline; }

/* Detail sections */
.detail-section { margin-bottom: 16px; }
.detail-section-title {
	font-size: 12px; font-weight: 700; color: var(--gray-400);
	text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}

/* Items table */
.detail-items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-items-table th {
	text-align: left; padding: 6px 8px; font-size: 11px; font-weight: 600;
	color: var(--gray-500); text-transform: uppercase; border-bottom: 1px solid var(--gray-200);
}
.detail-items-table th:last-child { text-align: right; }
.detail-items-table td { padding: 8px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.detail-items-table td:last-child { text-align: right; font-weight: 600; }
.detail-items-table .shipping-row td { color: var(--gray-500); font-style: italic; }
.detail-items-table .discount-row td { color: #16a34a; }
.detail-items-table .total-row td {
	font-size: 15px; font-weight: 700; color: var(--gray-900);
	border-top: 2px solid var(--gray-300); border-bottom: none;
}

/* Custom fields list */
.detail-fields { list-style: none; padding: 0; margin: 0; }
.detail-fields li {
	padding: 6px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px;
	display: flex; gap: 8px;
}
.detail-fields li:last-child { border-bottom: none; }
.detail-field-label { color: var(--gray-500); min-width: 120px; flex-shrink: 0; }
.detail-field-value { color: var(--gray-800); word-break: break-word; }

/* Shipping address */
.detail-address { font-size: 13px; line-height: 1.6; color: var(--gray-700); }

/* Notes */
.detail-notes {
	font-size: 13px; color: var(--gray-600); line-height: 1.6;
	font-style: italic; background: var(--gray-50); padding: 10px 14px;
	border-radius: var(--radius); border-left: 3px solid var(--gray-300);
}

/* Action buttons */
.detail-actions {
	display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px;
	padding-top: 16px; border-top: 1px solid var(--gray-100);
}
.detail-btn {
	padding: 8px 16px; font-size: 13px; font-weight: 600;
	border-radius: var(--radius); cursor: pointer; border: 1px solid var(--gray-200);
	background: white; color: var(--gray-700); text-decoration: none;
	display: inline-flex; align-items: center; gap: 6px;
	transition: all 0.15s;
}
.detail-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.detail-btn-edit {
	background: #f0f9ff; color: #0369a1; border-color: #bae6fd;
}
.detail-btn-edit:hover { background: #e0f2fe; border-color: #7dd3fc; }
.detail-btn-primary {
	background: var(--primary); color: white; border-color: var(--primary);
}
.detail-btn-primary:hover { background: #4338ca; }

/* Contact modal */
.modal-backdrop {
	position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000;
	display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-card {
	background: white; border-radius: var(--radius-lg); padding: 32px;
	max-width: 420px; width: 100%; box-shadow: var(--shadow-lg);
}

/* Badge */
.badge {
	display: inline-block; padding: 2px 10px; border-radius: 999px;
	font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-shipped { background: #ede9fe; color: #5b21b6; }
.badge-delivered { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* Empty / no results */
.empty-state {
	text-align: center; padding: 60px 24px; color: var(--gray-400);
}
.empty-state h2 { font-size: 20px; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { font-size: 14px; margin-bottom: 24px; }

/* Payment proof */
.payment-proof-thumb {
	max-width: 120px; max-height: 80px; border-radius: var(--radius);
	border: 1px solid var(--gray-200); cursor: pointer;
}

@media (max-width: 600px) {
	.container { padding: 20px 16px 40px; }
	.my-order-summary { padding: 14px 16px; }
	.filter-bar { flex-direction: column; }
	.filter-search, .filter-select { width: 100%; }
	.status-step-label { font-size: 10px; }
	.status-dot { width: 24px; height: 24px; font-size: 10px; }
	.detail-actions { flex-direction: column; }
	.detail-btn { width: 100%; justify-content: center; }
	.detail-items-table { font-size: 12px; }
}
