.tdb-orders {
	--tdb-primary:#6baa3a;
	--tdb-primary-dark:#3f7d22;
	--tdb-accent:#a8c94b;
	--tdb-text:#1f2a1d;
	--tdb-muted:#7b8378;
	--tdb-line:#e7ecdf;
	--tdb-soft:#f8fbf4;
	--tdb-white:#fff;
	color:var(--tdb-text);
}

.tdb-orders-header {
	margin-bottom:28px;
}

.tdb-orders-title {
	margin:0;
	font-size:clamp(34px,5vw,54px);
	font-weight:850;
	letter-spacing:-.04em;
	color:var(--tdb-text);
}

.tdb-orders-subtitle {
	margin:8px 0 0;
	color:var(--tdb-muted);
	font-size:15px;
}

.tdb-orders-tools {
	display:grid;
	grid-template-columns:1fr 1fr;
	gap:14px;
	margin:26px 0 22px;
}

.tdb-orders-tools input {
	width:100%;
	height:48px;
	border:1px solid var(--tdb-line);
	border-radius:14px;
	padding:0 16px;
	background:var(--tdb-soft);
	font-size:15px;
	outline:none;
}

.tdb-orders-tools input:focus {
	border-color:var(--tdb-primary);
	background:#fff;
}

.tdb-orders-list {
	border-top:1px solid var(--tdb-line);
}

.tdb-order {
	display:grid;
	grid-template-columns:minmax(8em,1.1fr) minmax(0,1.25fr) minmax(0,.8fr) minmax(0,.55fr) minmax(0,.65fr) minmax(0,1.1fr);
	gap:18px;
	align-items:start;
	padding:22px 0;
	border-bottom:1px solid var(--tdb-line);
}

.tdb-order-main a {
	color:var(--tdb-text);
	text-decoration:none;
	font-size:19px;
	font-weight:850;
}

.tdb-order-main a:hover {
	color:var(--tdb-primary-dark);
}

.tdb-order-date {
	margin-top:5px;
	color:var(--tdb-muted);
	font-size:14px;
}

.tdb-label {
	display:block;
	margin-bottom:5px;
	color:var(--tdb-muted);
	font-size:12px;
	font-weight:800;
	text-transform:uppercase;
	letter-spacing:.05em;
}

.tdb-value {
	color:var(--tdb-text);
	font-size:16px;
	font-weight:750;
}

.tdb-price {
	color:var(--tdb-primary-dark);
	font-size:17px;
	font-weight:850;
	white-space:normal;
}

.tdb-status {
	display:inline-flex;
	align-items:center;
	gap:8px;
	padding:7px 11px;
	border-radius:999px;
	font-size:13px;
	font-weight:850;
	background:#eef5e7;
	color:var(--tdb-primary-dark);
}

.tdb-status:before {
	content:"";
	width:7px;
	height:7px;
	border-radius:50%;
	background:currentColor;
}

.tdb-status.is-active {
	background:#fff8df;
	color:#9a7410;
}

.tdb-status.is-cancelled {
	background:#fff1ef;
	color:#b54032;
}

.tdb-status.is-default {
	background:#f2f3f1;
	color:#66705f;
}

.tdb-order-actions {
	display:flex;
	flex-direction:column;
	align-items:flex-start;
	gap:8px;
}

.tdb-action {
	display:inline-flex;
	align-items:center;
	gap:6px;
	border:0;
	background:transparent;
	color:var(--tdb-text);
	font-size:14px;
	font-weight:800;
	text-decoration:none !important;
	padding:4px 0;
	transition:.15s ease;
	white-space:normal;
}

.tdb-action:hover {
	color:var(--tdb-primary-dark);
	text-decoration:underline !important;
	text-underline-offset:4px;
}

.tdb-action svg {
	width:17px;
	height:17px;
	flex:0 0 17px;
	stroke:currentColor;
}

.tdb-action--invoice {
	color:var(--tdb-primary-dark);
}

.tdb-action--repeat {
	color:#5f6b59;
}

.tdb-action--pay {
	color:#b54032;
}

.tdb-empty {
	padding:26px 0;
	border-top:1px solid var(--tdb-line);
	color:var(--tdb-muted);
}

.tdb-pagination {
	display:flex;
	justify-content:space-between;
	gap:12px;
	margin-top:24px;
}

.tdb-pagination a {
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:42px;
	padding:0 18px;
	border-radius:999px;
	background:var(--tdb-primary);
	color:#fff;
	font-weight:850;
	text-decoration:none;
}

@media (max-width:1150px) {
	.tdb-orders-tools {
		grid-template-columns:1fr;
	}

	.tdb-order {
		grid-template-columns:1fr 1fr;
		padding:20px 0;
	}

	.tdb-order-main,
	.tdb-order-actions {
		grid-column:1 / -1;
	}

	.tdb-order-actions {
		justify-content:flex-start;
	}
}

@media (max-width:560px) {
	.tdb-order {
		grid-template-columns:1fr;
		gap:12px;
	}

	.tdb-order-actions {
		display:grid;
		grid-template-columns:1fr;
		gap:12px;
	}

	.tdb-orders-title {
		font-size:38px;
	}
}
/* Fixed tracks prevent action labels from changing each row's column widths. */
.tdb-orders .tdb-order > div { min-width: 0; overflow-wrap: anywhere; }
.tdb-orders .tdb-order-heading,
.tdb-orders .tdb-order-number { display: block; white-space: nowrap; }
.tdb-orders .tdb-status:before { flex: 0 0 7px; }
.tdb-orders .tdb-order-products { position: relative; }
.tdb-orders .tdb-products-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 8px;
    border: 1px solid #cbd9c2;
    border-radius: 8px;
    background: #f1f6ec;
    color: #34512d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.tdb-orders .tdb-products-trigger:hover,
.tdb-orders .tdb-products-trigger[aria-expanded="true"] { background: #e3eddc; }
.tdb-orders .tdb-products-trigger:focus-visible { outline: 2px solid #477450; outline-offset: 3px; }
.tdb-orders .tdb-products-trigger svg { width: 17px; height: 17px; flex: 0 0 17px; }
.tdb-orders .tdb-products-tooltip {
    position: fixed;
    z-index: 10000;
    box-sizing: border-box;
    width: min(340px, calc(100vw - 32px));
    max-height: min(320px, calc(100vh - 32px));
    overflow-y: auto;
    padding: 16px;
    border: 1px solid #cad8c2;
    border-radius: 12px;
    background: #fff;
    color: #263d2b;
    box-shadow: 0 8px 28px #203c2926;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}
.tdb-orders .tdb-products-tooltip[hidden] { display: none; }
.tdb-orders .tdb-products-tooltip ul { margin: 10px 0 0; padding: 0; list-style: none; }
.tdb-orders .tdb-products-tooltip li { padding: 6px 0; border-top: 1px solid #e7ecdf; }

/* Both navigation modes use the same five-order pages. */
.tdb-orders .tdb-orders-paging { text-align: center; padding-top: 24px; }
.tdb-orders .tdb-load-status { margin: 0 0 14px; color: var(--tdb-muted); font-size: 14px; }
.tdb-orders .tdb-load-more {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 10px 22px; border: 1px solid #477450;
    border-radius: 10px; background: #edf4e8; color: #294b32; font-weight: 700; text-decoration: none;
}
.tdb-orders .tdb-load-more:hover { background: #dfead8; }
.tdb-orders .tdb-load-more[aria-disabled="true"] { opacity: .65; cursor: wait; }
.tdb-orders .tdb-load-more[hidden] { display: none; }
.tdb-orders .tdb-pagination { justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.tdb-orders .tdb-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; min-height: 40px; padding: 6px 12px;
    border-radius: 8px; border: 1px solid var(--tdb-line); background: white; color: #34512d; font-weight: 600;
}
.tdb-orders .tdb-pagination .current { background: #477450; color: white; border-color: #477450; }
.tdb-orders .tdb-pagination a:hover { background: #edf4e8; }
.tdb-orders .tdb-pagination .dots { border: 0; background: transparent; min-width: 20px; padding: 0; }

.tdb-orders .tdb-orders-search-hint { margin: 8px 0 0; font-size: 13px; color: var(--tdb-muted); }
