/*
 * Seller dashboard (Dokan) layout — loaded only on the dashboard (inc/tb-vendor-dashboard.php), owner 2026-10-18.
 * One tinted workspace under the header: the menu and the page are two cards with the same gutter, no empty band above them,
 * no white strip between them; WooCommerce Admin's summary grid without the list indent and the grey filler.
 */

body.dokan-dashboard .site-content #primary { margin-top: 0 !important; margin-bottom: 0 !important; }   /* Astra's layout rule is more specific */
body.dokan-dashboard .site-content article.page { padding: 0; }
body.dokan-dashboard .entry-header { display: none; }                      /* «Панель керування»: the menu already says where we are */

body.dokan-dashboard .dokan-dashboard-wrap {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 20px;
	padding: 20px;
	background: #f4f5f9;
	min-height: calc(100vh - 70px);
}
body.dokan-dashboard .dokan-dashboard-wrap::before,
body.dokan-dashboard .dokan-dashboard-wrap::after { content: none; }      /* clearfix pseudo-elements would be flex items */

body.dokan-dashboard .dokan-dash-sidebar {
	float: none;
	flex: 0 0 240px;
	width: 240px;
	border-radius: 14px;
	overflow: hidden;
	position: sticky;
	top: 90px;
}
body.dokan-dashboard .dokan-dashboard-content {
	float: none;
	flex: 1 1 0;
	width: auto !important;          /* .dokan-reports-content / .dokan-product-listing set width: 100% and pushed it under the menu */
	min-width: 0;
	padding: 22px 26px 28px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, .06);
}

/* WooCommerce Admin summary (Огляд, Звіти): the <ul> got the theme's list indent, empty cells showed the grid's grey */
body.dokan-dashboard .woocommerce-summary { padding-left: 0; margin-left: 0; background: #fff; border-radius: 10px; overflow: hidden; }
body.dokan-dashboard .woocommerce-layout { padding: 0; }
body.dokan-dashboard .woocommerce-layout__primary { margin: 0; }
body.dokan-dashboard .woocommerce-layout__header .entry-title { margin-left: 0; }   /* «Огляд» lined up with the page */

/* «Замовлення» filters: Dokan gave the form 66 % of the page (!important), so the fields were cut («Фільтрува…», «Шукати
   замовле») and «Скинути» and the export buttons fell onto lines of their own — the filters take the whole row, the exports
   follow on the right */
body.dokan-dashboard .dokan-orders-area .dokan-order-filter-serach { display: flex; flex-wrap: wrap; gap: 10px; }
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach > form { float: none; width: 100% !important; margin: 0; }
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach > .dokan-clearfix { display: none; }
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach .dokan-form-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach .dokan-right .dokan-form-group { justify-content: flex-end; }
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach .dokan-form-group > * { margin: 0 !important; }
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach .dokan-left .dokan-form-group > .select2-container,
body.dokan-dashboard .dokan-orders-content .dokan-orders-area .dokan-order-filter-serach .dokan-left .dokan-form-group > input { flex: 1 1 200px; width: auto !important; min-width: 0; }

/* «Товари» / «Замовлення» tables took Astra's 16 px: at a 1360 px window the products table was 37 px wider than the page
   (the «Дата» column cut off, names on 5–6 lines). Data tables use 14 px; narrower windows scroll the table, not the page. */
body.dokan-dashboard .dokan-dashboard-content table.dokan-table { font-size: 14px; }
body.dokan-dashboard .dokan-dashboard-content form#product-filter,
body.dokan-dashboard .dokan-dashboard-content form#order-filter { overflow-x: auto; width: 100%; }   /* a flex item: without the width it shrank to 0 */

/* Report tables: the header's screen-reader «Сортувати за …» spans were positioned against the card, not the table's scroller,
   so they widened the page card (1611 of 1045 px) and a click on a KPI («Чистий обсяг продажів») scrolled the whole report
   ~370 px to the left. The scroller is their containing block now. */
body.dokan-dashboard .woocommerce-table__table { position: relative; }

/* Period calendars (react-dates): the theme's table rules (cell padding, line height, table margins) made every week taller
   than the picker measured, so the last week of a month was cut off. */
body.dokan-dashboard .woocommerce-calendar table { margin: 0; }
body.dokan-dashboard .woocommerce-calendar td.CalendarDay { padding: 0; line-height: normal; vertical-align: middle; }

/* Dokan's modals (withdraw request, …) dim the page with `bg-black bg-opacity-75`, but its CSS only scopes `.dokan-layout .bg-black`
   (opacity 1): the page behind a modal turned solid black. */
body.dokan-dashboard .dokan-layout .bg-opacity-75 { --tw-bg-opacity: .75; }

/* Astra caps every number input of a WooCommerce page at 58 px (meant for the quantity ±): the coupon form's «Сума купона»,
   «Ліміт використання» showed «Вве» / «Лім» in a stub next to an empty frame. Dokan's React forms size their own inputs. */
body.dokan-dashboard .dokan-layout input[type="number"] { max-width: none; }

/* WooCommerce Admin popovers: Ukrainian labels are longer — the period picker (320 px) wrapped «За останній тиждень», the «⋮»
   menus of charts and tables (182 px, centred under a button at the right edge) wrapped every label and ran off the screen.
   The menus get room and end at their button's right edge (`translate` adds to the popover's own transform). */
body.dokan-dashboard .woocommerce-filters-date__content .components-popover__content { width: 420px; max-width: calc(100vw - 32px); }
body.dokan-dashboard .woocommerce-ellipsis-menu__popover .components-popover__content { width: 280px; }
body.dokan-dashboard .woocommerce-ellipsis-menu__popover { translate: -122px 0; }

@media (max-width: 1023px) {
	body.dokan-dashboard .dokan-dashboard-wrap { flex-direction: column; gap: 14px; padding: 12px; }
	body.dokan-dashboard .dokan-dash-sidebar { position: static; flex-basis: auto; width: 100%; }
	body.dokan-dashboard .dokan-dashboard-content { width: 100% !important; padding: 16px; }
}
