/* ============================================================================
 * Кабинет продавца: оболочка, главный экран «Обзор», внутренние экраны.
 *
 * Классы с префиксом ms-cab__ (cabinet). Всё висит на .ms-cabinet-area — класс
 * ставится только в кабинете, поэтому витрину и страницы WooCommerce не задеваем.
 * Значения берём из токенов темы --ms-* (style.css).
 * ==========================================================================*/

/* --- Каркас: сайдбар слева, содержимое справа --- */
.ms-cabinet-area .ms-vd-wrap {
	display: grid;
	grid-template-columns: 268px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	margin: 24px 0 56px;
}

.ms-cabinet-area .ms-vd-content {
	width: auto;
	padding: 0;
	margin: 0;
	overflow: visible;
}


/* --- Ширина: кабинет занимает весь контент страницы ---
   У страниц темы главная колонка ограничена 980px, а рядом зарезервирована
   колонка блога 320px. Из-за этого кабинет сжимался вдвое (688px содержимого
   на 1440px экрана), а справа оставалась пустота: таблицам заказов и сетке
   обзора не хватало места. Продавцу нужна вся ширина страницы. */
.ms-cabinet-area .ms-layout { grid-template-columns: minmax(0, 1fr); }
.ms-cabinet-area .ms-layout__main--single { max-width: none; }

/* --- Сайдбар --- */
.ms-cab__side {
	position: sticky;
	top: 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 14px;
	border: 1px solid var(--ms-line);
	border-radius: var(--ms-r-lg);
	background: var(--ms-bg);
	box-shadow: var(--ms-sh-1);
}

.ms-cab__store {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 6px 12px;
	border-bottom: 1px solid var(--ms-line);
}

.ms-cab__logo {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	overflow: hidden;
	background: var(--ms-bg-3);
	display: grid;
	place-items: center;
}

.ms-cab__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ms-cab__logo--text {
	background: var(--ms-accent-soft);
	color: var(--ms-accent-text);
	font-family: var(--ms-font-head);
	font-size: 18px;
	font-weight: 700;
}

.ms-cab__storetext { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.ms-cab__storename {
	font-family: var(--ms-font-head);
	font-size: 15px;
	font-weight: 600;
	color: var(--ms-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ms-cab__status {
	font-size: 12px;
	font-weight: 600;
	color: var(--ms-ink-2);
}

.ms-cab__status--active { color: #17743f; }
.ms-cab__status--pending { color: #8a5c00; }

.ms-cab__close { display: none; }

.ms-cab__nav { display: flex; flex-direction: column; gap: 6px; }

.ms-cab__grouptitle {
	margin: 8px 8px 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ms-ink-2);
}

.ms-cab__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.ms-cab__link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 8px 10px;
	border-radius: var(--ms-r-sm);
	color: var(--ms-ink);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background .16s, color .16s;
}

.ms-cab__link:hover { background: var(--ms-bg-2); color: var(--ms-ink); }

.ms-cab__link.is-active {
	background: var(--ms-accent-soft);
	color: var(--ms-accent-text);
	font-weight: 600;
}

.ms-cab__link.is-active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	bottom: 10px;
	width: 3px;
	border-radius: 3px;
	background: var(--ms-accent);
}

.ms-cab__link--cta {
	margin-top: 4px;
	border: 1px dashed var(--ms-line-2);
	color: var(--ms-accent-text);
	font-weight: 600;
}

.ms-cab__ico { flex: 0 0 auto; }

.ms-cab__linktext { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ms-cab__badge {
	flex: 0 0 auto;
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: #b0362a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
}

.ms-cab__burger { display: none; }

/* --- Экран --- */
.ms-cab {
	--ms-cab-gap: 18px;
	color: var(--ms-ink);
	font-size: 14px;
	line-height: 1.45;
}

.ms-cab *,
.ms-cab *::before,
.ms-cab *::after { box-sizing: border-box; }

.ms-cab__screen { display: flex; flex-direction: column; gap: var(--ms-cab-gap); }

.ms-cab__notice {
	margin: 0;
	padding: 10px 14px;
	border: 1px solid rgba(40, 175, 177, .35);
	border-radius: var(--ms-r-sm);
	background: var(--ms-accent-soft);
	color: var(--ms-accent-text);
	font-size: 13px;
	font-weight: 600;
}

.ms-cab__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
}

.ms-cab__headmain { min-width: 0; }

.ms-cab__title {
	margin: 0;
	font-family: var(--ms-font-head);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ms-ink);
}

.ms-cab__sub { margin: 6px 0 0; color: var(--ms-ink-2); font-size: 14px; }
.ms-cab__sub b { color: var(--ms-ink); }

.ms-cab__headactions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.ms-cab__period {
	display: inline-flex;
	padding: 3px;
	border: 1px solid var(--ms-line);
	border-radius: 999px;
	background: var(--ms-bg);
}

.ms-cab__periodbtn {
	padding: 6px 13px;
	border-radius: 999px;
	color: var(--ms-ink-2);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.ms-cab__periodbtn:hover { color: var(--ms-ink); background: var(--ms-bg-2); }

.ms-cab__periodbtn.is-active { background: #12787a; color: #fff; }

/* --- Кнопки --- */
.ms-cab__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--ms-line);
	border-radius: 12px;
	background: var(--ms-bg);
	color: var(--ms-ink);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background .16s, border-color .16s, color .16s;
}

.ms-cab__btn:hover { border-color: var(--ms-line-2); background: var(--ms-bg-2); color: var(--ms-ink); }

.ms-cab__btn--primary {
	border-color: transparent;
	background: #12787a;
	color: #fff;
}

.ms-cab__btn--primary:hover { background: #0e6163; color: #fff; }

.ms-cab__btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; }

/* --- Карточки --- */
.ms-cab__card {
	padding: 18px 20px 20px;
	border: 1px solid var(--ms-line);
	border-radius: var(--ms-r-lg);
	background: var(--ms-bg);
	box-shadow: var(--ms-sh-1);
}

.ms-cab__cardhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.ms-cab__cardtitle {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-family: var(--ms-font-head);
	font-size: 17px;
	font-weight: 600;
	color: var(--ms-ink);
}

.ms-cab__cardmeta, .ms-cab__cardlink { color: var(--ms-ink-2); font-size: 13px; }

.ms-cab__cardlink {
	font-weight: 600;
	color: var(--ms-accent-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ms-cab__cardlink:hover { color: var(--ms-accent-d); }

.ms-cab__pill {
	min-width: 26px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--ms-bg-3);
	color: var(--ms-ink);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.ms-cab__pill--ok { background: rgba(46, 158, 91, .14); color: #17743f; }

.ms-cabinet-area .select2-selection__placeholder { color: #5d6b6d !important; }

.ms-cabinet-area .select2-container .select2-selection--single {
	min-height: 44px;
	border: 1px solid var(--ms-line-2);
	border-radius: var(--ms-r-sm);
}

.ms-cabinet-area .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 42px;
	color: var(--ms-ink);
}

.ms-cabinet-area .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }

.ms-cab__cardtext { margin: 0 0 10px; color: var(--ms-ink-3); font-size: 14px; }
.ms-cab__cardsub { margin: 14px 0 8px; color: var(--ms-ink-2); font-size: 13px; font-weight: 600; }

.ms-cab__cardnote {
	margin: 12px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--ms-line);
	color: var(--ms-ink-2);
	font-size: 13px;
}

.ms-cab__card--todo { border-color: rgba(210, 74, 61, .3); }
.ms-cab__card--launch { border-style: dashed; }

.ms-cab__hintcard {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid rgba(216, 154, 23, .35);
	border-radius: var(--ms-r-sm);
	background: rgba(216, 154, 23, .08);
	color: #7a5606;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.ms-cab__sidefoot {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding-top: 10px;
	border-top: 1px solid var(--ms-line);
}

.ms-cab__sidehint { margin: 0 0 8px; padding: 0 8px; color: var(--ms-ink-2); font-size: 12px; line-height: 1.4; }

.ms-cab__footlink {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--ms-r-sm);
	color: var(--ms-ink-2);
	font-size: 13px;
	text-decoration: none;
}

.ms-cab__footlink:hover { background: var(--ms-bg-2); color: var(--ms-ink); }

.ms-cab__burger { display: none; }

/* --- Задачи: «требует внимания» --- */
.ms-cab__tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.ms-cab__task {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	align-items: start;
	gap: 12px;
	padding: 14px 0;
	border-top: 1px solid var(--ms-line);
}

.ms-cab__task:first-child { border-top: 0; padding-top: 4px; }

.ms-cab__taskico {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: var(--ms-bg-3);
	color: var(--ms-ink-2);
}

.ms-cab__task--critical .ms-cab__taskico { background: rgba(210, 74, 61, .12); color: var(--ms-sale); }
.ms-cab__task--warn .ms-cab__taskico { background: rgba(216, 154, 23, .14); color: #9a6c07; }
.ms-cab__task--info .ms-cab__taskico { background: var(--ms-accent-soft); color: var(--ms-accent-text); }

.ms-cab__taskbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.ms-cab__tasktitle { font-weight: 600; color: var(--ms-ink); }

.ms-cab__taskhint { color: var(--ms-ink-2); font-size: 13px; }

.ms-cab__tasknames {
	color: var(--ms-ink-3);
	font-size: 12.5px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Названия товаров в задаче — ссылки на правку этого товара. Селектор с двумя
   классами: у WooCommerce свои правила для ссылок внутри контента. */
.ms-cab .ms-cab__tasknames a {
	color: var(--ms-accent-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ms-cab .ms-cab__tasknames a:hover,
.ms-cab .ms-cab__tasknames a:focus-visible { color: var(--ms-ink); }

.ms-cab__task .ms-cab__btn { align-self: center; }

/* --- Плитки показателей --- */
.ms-cab__kpi {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
	gap: 12px;
}

.ms-cab__tile {
	padding: 14px 16px;
	border: 1px solid var(--ms-line);
	border-radius: var(--ms-r);
	background: var(--ms-bg);
	box-shadow: var(--ms-sh-1);
}

.ms-cab__tilelabel { margin: 0 0 6px; color: var(--ms-ink-2); font-size: 12.5px; }

.ms-cab__tilevalue {
	margin: 0;
	font-family: var(--ms-font-head);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
	color: var(--ms-ink);
}

.ms-cab__tilehint { margin: 6px 0 0; color: var(--ms-ink-2); font-size: 12.5px; }
.ms-cab__tilehint b { color: var(--ms-ink); }

/* --- Воронка --- */
.ms-cab__funnel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.ms-cab__step {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 84px 52px;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--ms-r-sm);
	background: var(--ms-bg-2);
	overflow: hidden;
}

.ms-cab__stepbar {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--ms-cab-width, 100%);
	background: linear-gradient(90deg, rgba(40, 175, 177, .18), rgba(40, 175, 177, .06));
	pointer-events: none;
}

.ms-cab__steptext { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ms-cab__steplabel { font-weight: 600; color: var(--ms-ink); }
.ms-cab__stephint { color: var(--ms-ink-2); font-size: 12.5px; }

.ms-cab__stepvalue {
	position: relative;
	font-family: var(--ms-font-head);
	font-size: 18px;
	font-weight: 700;
	text-align: right;
	color: var(--ms-ink);
}

.ms-cab__steprate { position: relative; color: var(--ms-accent-text); font-size: 12.5px; font-weight: 700; text-align: right; }

/* --- Таблицы --- */
.ms-cab__table { width: 100%; border-collapse: collapse; }

.ms-cab__table th {
	padding: 8px 10px;
	border-bottom: 1px solid var(--ms-line);
	color: var(--ms-ink-2);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-align: left;
}

.ms-cab__table td {
	padding: 11px 10px;
	border-bottom: 1px solid var(--ms-line);
	color: var(--ms-ink-3);
	vertical-align: middle;
}

.ms-cab__table tbody tr:last-child td { border-bottom: 0; }
.ms-cab__table tbody tr:hover td { background: var(--ms-bg-2); }

.ms-cab__num { text-align: right; }

.ms-cab__prodname { color: var(--ms-ink); font-weight: 600; text-decoration: none; }
.ms-cab__prodname:hover { color: var(--ms-accent-text); }

.ms-cab__tag {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--ms-bg-3);
	color: var(--ms-ink-2);
	font-size: 11px;
	font-weight: 600;
}

.ms-cab__tag--pending, .ms-cab__tag--on-hold { background: rgba(216, 154, 23, .16); color: #8a5c00; }
.ms-cab__tag--processing, .ms-cab__tag--completed { background: rgba(46, 158, 91, .14); color: #17743f; }
.ms-cab__tag--cancelled, .ms-cab__tag--failed, .ms-cab__tag--refunded { background: rgba(210, 74, 61, .12); color: #b0362a; }

.ms-cab__score {
	display: inline-block;
	min-width: 34px;
	padding: 2px 8px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 12.5px;
	background: var(--ms-bg-3);
	color: var(--ms-ink-2);
}

.ms-cab__score.is-low { background: rgba(210, 74, 61, .12); color: #b0362a; }
.ms-cab__score.is-mid { background: rgba(216, 154, 23, .16); color: #8a5c00; }
.ms-cab__score.is-high { background: rgba(46, 158, 91, .14); color: #17743f; }


/* --- Две колонки: товары и сравнение --- */
.ms-cab__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

/* --- Полосы сравнений --- */
.ms-cab__bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.ms-cab__bar { display: grid; grid-template-columns: minmax(0, 1fr) 96px 40px; align-items: center; gap: 10px; }

.ms-cab__barname {
	color: var(--ms-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ms-cab__barname:hover { color: var(--ms-accent-text); }

.ms-cab__barline { height: 8px; border-radius: 999px; background: var(--ms-bg-3); overflow: hidden; }

.ms-cab__barline span {
	display: block;
	height: 100%;
	width: var(--ms-cab-width, 100%);
	border-radius: 999px;
	background: var(--ms-accent);
}

.ms-cab__barvalue { color: var(--ms-ink); font-size: 13px; font-weight: 700; text-align: right; }

.ms-cab__rivals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.ms-cab__rivals li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--ms-r-sm);
	background: var(--ms-bg-2);
}

.ms-cab__rivals a { color: var(--ms-ink); font-size: 13px; text-decoration: none; }
.ms-cab__rivals a:hover { color: var(--ms-accent-text); text-decoration: underline; }

.ms-cab__rivalhits { color: var(--ms-ink-2); font-size: 12.5px; font-weight: 700; }

/* --- Пустые состояния --- */
.ms-cab__empty {
	padding: 22px 18px;
	border: 1px dashed var(--ms-line-2);
	border-radius: var(--ms-r);
	background: var(--ms-bg-2);
	text-align: center;
}

.ms-cab__emptytitle {
	margin: 0 0 6px;
	font-family: var(--ms-font-head);
	font-size: 16px;
	font-weight: 600;
	color: var(--ms-ink);
}

.ms-cab__emptytext { margin: 0 auto 14px; max-width: 60ch; color: var(--ms-ink-2); font-size: 13.5px; }

.ms-cab__emptyactions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* --- Чек-лист запуска --- */
.ms-cab__launch { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }

.ms-cab__launchitem { display: flex; align-items: center; gap: 8px; }

.ms-cab__launchmark {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--ms-bg-3);
	color: var(--ms-ink-2);
	font-size: 12px;
	font-weight: 700;
}

.ms-cab__launchitem.is-done .ms-cab__launchmark { background: rgba(46, 158, 91, .14); color: #17743f; }

.ms-cab__launchlabel { color: var(--ms-ink-2); font-size: 13.5px; text-decoration: none; }
.ms-cab__launchitem.is-done .ms-cab__launchlabel { text-decoration: line-through; }
.ms-cab__launchitem:not(.is-done) .ms-cab__launchlabel { color: var(--ms-accent-text); font-weight: 600; }
.ms-cab__launchitem:not(.is-done) .ms-cab__launchlabel:hover { text-decoration: underline; }



/* --- Поля форм: тот же вид, что в кабинете покупателя ---
   Поля кабинета приводим к токенам темы: рамка --ms-line-2,
   радиус --ms-r-sm, отступы 10/14px, высота 44px. */
.ms-cabinet-area .ms-vd-content input[type="text"],
.ms-cabinet-area .ms-vd-content input[type="email"],
.ms-cabinet-area .ms-vd-content input[type="number"],
.ms-cabinet-area .ms-vd-content input[type="tel"],
.ms-cabinet-area .ms-vd-content input[type="password"],
.ms-cabinet-area .ms-vd-content input[type="search"],
.ms-cabinet-area .ms-vd-content input[type="date"],
.ms-cabinet-area .ms-vd-content select,
.ms-cabinet-area .ms-vd-content textarea {
	width: 100%;
	height: auto;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--ms-line-2);
	border-radius: var(--ms-r-sm);
	background: var(--ms-bg);
	color: var(--ms-ink);
	font-size: 15px;
	box-shadow: none;
}


/* select2 держит рядом со своим полем исходный <select class="select2-hidden-accessible">
   и скрывает его. Наш общий стиль полей делал этот select видимым: он занимал место
   в потоке и на узком экране растягивал страницу. Возвращаем штатное скрытие.
   Ширину ограничиваем через max-width: у сторонних фильтров встречается правило
   ширины с !important, и перебить его одним только width нельзя. */
.ms-cabinet-area .ms-vd-content .select2-hidden-accessible {
	position: absolute !important;
	width: 1px !important;
	max-width: 1px !important;
	height: 1px !important;
	min-height: 0 !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}


.ms-cabinet-area .ms-vd-content input:focus,
.ms-cabinet-area .ms-vd-content select:focus,
.ms-cabinet-area .ms-vd-content textarea:focus {
	border-color: var(--ms-accent);
	box-shadow: 0 0 0 3px rgba(40, 175, 177, .16);
	outline: none;
}

/* Подписи полей: у формы магазина они крупнее и темнее, чем в кабинете покупателя. */
.ms-cabinet-area .ms-vd-content label {
	color: var(--ms-ink-2);
	font-size: 13px;
	font-weight: 600;
}

/* --- Узкие экраны: сайдбар уезжает в выдвижную панель --- */
@media (max-width: 1100px) {
	.ms-cabinet-area .ms-vd-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }

	.ms-cab__side {
		position: fixed;
		z-index: 60;
		top: 0;
		left: 0;
		bottom: 0;
		width: 288px;
		max-width: 88vw;
		border-radius: 0 var(--ms-r-lg) var(--ms-r-lg) 0;
		overflow-y: auto;
		transform: translateX(-102%);
		transition: transform .22s ease;
	}

	/* Панель должна перекрывать шапку сайта (у неё z-index 900): иначе верх
	   панели — карточка покупателя или магазина — остаётся под шапкой. */
	.ms-cab-side-open .ms-cab__side { transform: none; z-index: 940; box-shadow: var(--ms-sh-2); }

	.ms-cab__close {
		display: grid;
		place-items: center;
		width: 32px;
		height: 32px;
		margin-left: auto;
		border: 1px solid var(--ms-line);
		border-radius: 10px;
		background: var(--ms-bg);
		color: var(--ms-ink-2);
		cursor: pointer;
	}

	.ms-cab__close::before { content: "✕"; font-size: 13px; line-height: 1; }

	.ms-cab__burger {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		margin: 0 0 14px;
		padding: 10px 14px;
		border: 1px solid var(--ms-line);
		border-radius: 12px;
		background: var(--ms-bg);
		color: var(--ms-ink);
		font: inherit;
		font-weight: 600;
		cursor: pointer;
	}

	.ms-cab__grid { grid-template-columns: minmax(0, 1fr); }
	.ms-cab__task { grid-template-columns: 34px minmax(0, 1fr); }
	.ms-cab__task .ms-cab__btn { grid-column: 2; justify-self: start; }
	.ms-cab__bar { grid-template-columns: minmax(0, 1fr) 64px 34px; }
}

@media (max-width: 560px) {
	.ms-cab__head { align-items: flex-start; }
	.ms-cab__title { font-size: 22px; }
	.ms-cab__tilevalue { font-size: 21px; }
	.ms-cab__step { grid-template-columns: minmax(0, 1fr) 64px; }
	.ms-cab__steprate { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ms-cab__side, .ms-cab__link, .ms-cab__btn { transition: none; }
}


.ms-cabinet-area .ms-vd-content .woocommerce-Price-amount { color: var(--ms-ink); font-weight: 600; }




/* ============================================================================
 * Заявки в кабинете продавца
 *
 * Продавец отвечает на вопросы и разбирает запросы счёта, не заходя в админку
 * сайта. Карточка заявки построена как «кто → что нужно → что сделать»: сначала
 * контакт и товар, потом сообщение, потом действия.
 * ========================================================================== */

.ms-leads__head {
	margin-bottom: 18px;
}

.ms-leads__title {
	margin: 0 0 6px;
	font-family: var(--ms-font-head);
	font-size: 26px;
	font-weight: 700;
}

.ms-leads__sub {
	margin: 0;
	max-width: 70ch;
	font-size: 14px;
	line-height: 1.5;
}

.ms-leads__notice {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-left: 3px solid var(--ms-ok, #166b3a);
	border-radius: 8px;
	background: #f2fbf5;
	font-size: 14px;
}

.ms-leads__notice--warn {
	border-left-color: var(--ms-sale, #d24a3d);
	background: #fdf3f2;
}

.ms-leads__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.ms-leads__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 1px solid var(--ms-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ms-ink);
	font-size: 14px;
	text-decoration: none;
}

.ms-leads__tab.is-on {
	border-color: var(--ms-accent);
	background: var(--ms-accent-soft, #e8f6f6);
	color: var(--ms-accent-text, #12787a);
	font-weight: 600;
}

.ms-leads__tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: var(--ms-bg-3, #eef2f2);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

.ms-leads__tab.is-on .ms-leads__tab-count {
	background: #fff;
}

.ms-leads__list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ms-leads__item {
	padding: 16px 18px;
	border: 1px solid var(--ms-line);
	border-radius: 14px;
	background: #fff;
}

/* Новая заявка заметна сразу: её нельзя пропустить в списке. */
.ms-leads__item--new {
	border-left: 4px solid var(--ms-sale, #d24a3d);
}

.ms-leads__item--work {
	border-left: 4px solid #dba617;
}

.ms-leads__item--done {
	border-left: 4px solid var(--ms-ok, #166b3a);
}

.ms-leads__item-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.ms-leads__type {
	font-weight: 700;
	font-size: 15px;
}

.ms-leads__date {
	margin-left: auto;
	font-size: 13px;
}

.ms-leads__status {
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.ms-leads__status--new { background: #fcf0f1; color: #a3241c; }
.ms-leads__status--work { background: #fdf6e3; color: #7a5a0b; }
.ms-leads__status--done { background: #f2fbf5; color: #14612f; }
.ms-leads__status--spam { background: #f0f0f1; color: #646970; }

.ms-leads__body { display: grid; gap: 6px; }

.ms-leads__who {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
}

.ms-leads__contacts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0;
}

.ms-leads__contact {
	font-size: 15px;
	color: var(--ms-accent-text, #12787a);
	text-decoration: none;
	border-bottom: 1px dashed currentColor;
}

.ms-leads__contact:hover { border-bottom-style: solid; }

.ms-leads__product {
	margin: 0;
	font-size: 14px;
}

.ms-leads__product a { color: var(--ms-ink); }

.ms-leads__message {
	margin: 4px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--ms-bg, #f7fafa);
	font-size: 14px;
	line-height: 1.5;
}

.ms-leads__answer {
	margin: 6px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f2fbf5;
	font-size: 14px;
	line-height: 1.5;
}

.ms-leads__answer-label {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 700;
	color: #14612f;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.ms-leads__actions {
	margin-top: 14px;
	display: grid;
	gap: 10px;
}

.ms-leads__form { margin: 0; display: grid; gap: 8px; }

.ms-leads__form textarea {
	width: 100%;
	min-height: 68px;
	padding: 10px 12px;
	border: 1px solid var(--ms-line);
	border-radius: 10px;
	font: inherit;
	font-size: 14px;
	resize: vertical;
}

.ms-leads__form--status { margin-top: 2px; }

.ms-leads__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ms-leads__empty {
	padding: 40px 24px;
	border: 1px dashed var(--ms-line);
	border-radius: 14px;
	text-align: center;
}

.ms-leads__empty-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 700;
}

.ms-leads__pager {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 20px;
}

.ms-leads__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--ms-line);
	border-radius: 10px;
	background: #fff;
	color: var(--ms-ink);
	text-decoration: none;
	font-size: 14px;
}

.ms-leads__page.is-on {
	border-color: var(--ms-accent);
	background: var(--ms-accent);
	color: var(--ms-accent-ink, #0e3b3c);
	font-weight: 700;
}

/* Ответ магазина на странице товара */
.ms-pdp__qa-answer {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--ms-bg, #f7fafa);
	border-left: 3px solid var(--ms-ok, #166b3a);
}

.ms-pdp__qa-answer-head {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 4px;
	font-size: 12px;
}

.ms-pdp__qa-answer-label {
	font-weight: 700;
	color: #14612f;
	text-transform: uppercase;
	letter-spacing: .04em;
}

@media (max-width: 767px) {
	.ms-leads__item { padding: 14px; }
	.ms-leads__date { margin-left: 0; width: 100%; }
}

/* Экран «Заказы» в кабинете продавца */
.ms-vo__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ms-vo__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--ms-line-2, #dfe6e6);
	border-radius: 999px;
	background: #fff;
	color: var(--ms-ink-2, #4a5a5c);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
}

.ms-vo__tab:hover { border-color: var(--ms-accent, #28afb1); color: var(--ms-ink, #12333a); }

.ms-vo__tab.is-on {
	background: var(--ms-accent-soft, #e6f7f7);
	border-color: var(--ms-accent, #28afb1);
	color: var(--ms-accent-text, #12787a);
}

.ms-vo__tabcount {
	min-width: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ms-bg-3, #f1f5f5);
	color: var(--ms-ink-2, #4a5a5c);
	font-size: 12px;
	font-weight: 700;
	text-align: center;
}

.ms-vo__tab.is-on .ms-vo__tabcount { background: #12787a; color: #fff; }

.ms-vo__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 12px 0 4px;
	color: var(--ms-ink-2, #4a5a5c);
	font-size: 13px;
}

.ms-vo__when { white-space: nowrap; }
.ms-vo__act { text-align: right; white-space: nowrap; }
.ms-vo__detail .ms-cab__table { margin-top: 10px; }

.ms-vo__pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
}

.ms-vo__pager .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 0 10px;
	border: 1px solid var(--ms-line-2, #dfe6e6);
	border-radius: 10px;
	background: #fff;
	color: var(--ms-ink, #12333a);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
}

.ms-vo__pager .page-numbers:hover { border-color: var(--ms-accent, #28afb1); }
.ms-vo__pager .page-numbers.current { background: #12787a; border-color: #12787a; color: #fff; }

@media (max-width: 767px) {
	.ms-vo__table { display: block; overflow-x: auto; }
	.ms-vo__tab { min-height: 44px; }
	.ms-vo__pager .page-numbers { min-width: 44px; min-height: 44px; }
}

/* Экраны «Выплаты» и «Настройки магазина» */
.ms-vpo__form,
.ms-vst__form { display: flex; flex-direction: column; gap: 14px; }

.ms-vst__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
	margin-bottom: 12px;
}

.ms-vpo__row,
.ms-vst__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
}

.ms-vpo__label,
.ms-vst__label {
	color: var(--ms-ink-2, #4a5a5c);
	font-size: 13px;
	font-weight: 600;
}

.ms-vpo__input,
.ms-vst__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--ms-line-2, #dfe6e6);
	border-radius: 10px;
	background: #fff;
	color: var(--ms-ink, #12333a);
	font-family: inherit;
	font-size: 14px;
}

.ms-vpo__input:focus,
.ms-vst__input:focus {
	border-color: var(--ms-accent, #28afb1);
	outline: none;
}

textarea.ms-vpo__input,
textarea.ms-vst__input {
	min-height: 96px;
	resize: vertical;
}

.ms-vpo__actions,
.ms-vst__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.ms-vpo__note {
	max-width: 34ch;
	color: var(--ms-ink-2, #4a5a5c);
	font-size: 13px;
}

.ms-vst__check { margin: 0; }

.ms-vst__check label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--ms-ink, #12333a);
	font-size: 13.5px;
}

.ms-vst__check input { width: 18px; height: 18px; }

@media (max-width: 767px) {
	.ms-vpo__actions .ms-cab__btn,
	.ms-vst__actions .ms-cab__btn {
		width: 100%;
		justify-content: center;
	}
}

