/* ============================================================
   TechDoc — техническая документация
   Стили подсистемы: вкладка товара, публичная страница, кабинет.
   Все классы с префиксами .tdoc- (витрина) и .tdc- (кабинет),
   чтобы не конфликтовать со стилями темы.
   ============================================================ */

.tdoc,
.tdoc * { box-sizing: border-box; }

.tdoc {
	--tdoc-brand: #3660bc;
	--tdoc-dark: #12275e;
	--tdoc-soft: #eef2fb;
	--tdoc-ink: #343434;
	--tdoc-muted: #7b8494;
	--tdoc-line: #e6e9f0;
	--tdoc-bg: #f5f7fc;
	--tdoc-red: #e74c3c;
	--tdoc-green: #27ae60;
	color: var(--tdoc-ink);
	font-size: 15px;
	line-height: 1.5;
}

/* ---------- Вкладка товара: интро ---------- */
.tdoc-intro {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: var(--tdoc-soft);
	border: 1px solid #d7e0f5;
	border-left: 4px solid var(--tdoc-brand);
	border-radius: 12px;
	padding: 16px 18px;
	margin-bottom: 26px;
}
.tdoc-intro__ic {
	flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, #3660bc, #24479a);
	box-shadow: 0 8px 18px rgba(54, 96, 188, .28);
}
.tdoc-intro__ic svg { display: block; }
.tdoc-intro b { color: var(--tdoc-dark); }
.tdoc-intro p { margin: 2px 0 0; color: #555b6e; }

/* ---------- Карточки документов ---------- */
.tdoc-grid {
	display: grid;
	/* auto-fit: два документа — две колонки, один — на всю ширину (без «дыры» справа) */
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: 22px;
	align-items: stretch;
}
@media (max-width: 560px) { .tdoc-grid { grid-template-columns: 1fr; } }

.tdoc-doc {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--tdoc-line);
	border-radius: 18px;
	padding: 26px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(18, 39, 94, .06);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tdoc-doc:before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; }
.tdoc-doc--pass:before { background: linear-gradient(90deg, #e74c3c, #ff8a6b); }
.tdoc-doc--cert:before { background: linear-gradient(90deg, #1e9e57, #4fd08a); }
.tdoc-doc:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(18, 39, 94, .14); border-color: #cdd8f0; }

.tdoc-doc__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.tdoc-doc__ic {
	flex: 0 0 62px; height: 62px; border-radius: 16px;
	display: flex; align-items: center; justify-content: center;
	color: #fff; box-shadow: 0 10px 22px rgba(0, 0, 0, .14);
}
.tdoc-doc--pass .tdoc-doc__ic { background: linear-gradient(135deg, #e74c3c, #ff7a5c); }
.tdoc-doc--cert .tdoc-doc__ic { background: linear-gradient(135deg, #1e9e57, #43c97e); }
.tdoc-doc__title { font-size: 19px; font-weight: 700; color: var(--tdoc-dark); }
.tdoc-doc__sub { font-size: 13px; color: var(--tdoc-muted); }
.tdoc-doc__desc { color: #555b6e; font-size: 14px; margin: 0 0 18px; min-height: 52px; }
.tdoc-doc__meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--tdoc-muted); margin-bottom: 18px; }
.tdoc-doc__meta span { display: inline-flex; align-items: center; gap: 6px; }
.tdoc-doc__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	margin-top: auto;
	width: 100%; color: #fff; font-weight: 700; border-radius: 12px;
	padding: 15px; font-size: 15px; border: 0; cursor: pointer; text-decoration: none;
	transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tdoc-doc--pass .tdoc-doc__btn { background: linear-gradient(135deg, #e74c3c, #ff7a5c); }
.tdoc-doc--cert .tdoc-doc__btn { background: linear-gradient(135deg, #1e9e57, #43c97e); }
.tdoc-doc__btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0, 0, 0, .18); color: #fff; }
.tdoc-doc__view {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	margin-top: 11px; width: 100%; font-size: 13px; font-weight: 600;
	color: #55617a; text-decoration: none; transition: color .15s;
}
.tdoc-doc__view:hover { color: var(--tdoc-brand); }
.tdoc-doc--pass .tdoc-doc__view:hover { color: var(--tdoc-red); }
.tdoc-doc--cert .tdoc-doc__view:hover { color: var(--tdoc-green); }
.tdoc-tag {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--tdoc-soft); color: var(--tdoc-brand);
	border-radius: 6px; padding: 2px 8px; font-weight: 700; letter-spacing: .4px;
}
.tdoc-doc__meta .tdoc-tag { color: var(--tdoc-brand); }
.tdoc-foot {
	display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
	margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--tdoc-line);
	color: var(--tdoc-muted); font-size: 14px;
}
.tdoc-foot a { color: var(--tdoc-brand); font-weight: 700; text-decoration: none; }
.tdoc-foot a:hover { text-decoration: underline; }

/* ============================================================
   ПУБЛИЧНАЯ СТРАНИЦА
   ============================================================ */
.tdoc-page { padding-bottom: 40px; }

.tdoc-hero {
	background: linear-gradient(120deg, #0d1f4d 0%, #16307a 45%, #3660bc 100%);
	color: #fff; position: relative; overflow: hidden;
	border-radius: 0;
}
.tdoc-hero:after {
	content: ""; position: absolute; right: -80px; top: -80px; width: 420px; height: 420px;
	background: radial-gradient(circle, rgba(255, 208, 68, .22), transparent 65%); border-radius: 50%;
}
.tdoc-hero__in { position: relative; z-index: 2; padding: 44px 0 46px; }
.tdoc-hero h1 { margin: 0 0 12px; font-size: 34px; font-weight: 900; letter-spacing: .3px; color: #fff; }
.tdoc-hero p { margin: 0; max-width: 680px; color: rgba(255, 255, 255, .85); font-size: 16px; }
.tdoc-hero__stats { display: flex; gap: 34px; margin-top: 24px; flex-wrap: wrap; }
.tdoc-stat b { display: block; font-size: 28px; font-weight: 900; color: #fff; }
.tdoc-stat span { font-size: 13px; color: rgba(255, 255, 255, .72); }

.tdoc-toolbar {
	background: #fff; border-bottom: 1px solid var(--tdoc-line);
	box-shadow: 0 6px 18px rgba(18, 39, 94, .06); margin-bottom: 26px;
}
.tdoc-toolbar__in { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 16px 0; }
.tdoc-search {
	flex: 1 1 320px; display: flex; align-items: center; gap: 10px;
	background: var(--tdoc-bg); border: 1px solid var(--tdoc-line);
	border-radius: 12px; padding: 0 14px; height: 48px;
}
.tdoc-search:focus-within { border-color: var(--tdoc-brand); background: #fff; box-shadow: 0 0 0 4px rgba(54, 96, 188, .1); }
.tdoc-search svg { flex: 0 0 auto; opacity: .55; }
.tdoc-search input { border: 0; background: transparent; outline: none; font: inherit; width: 100%; color: var(--tdoc-ink); }
.tdoc-count { color: var(--tdoc-muted); font-size: 14px; white-space: nowrap; }

.tdoc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 1100px) { .tdoc-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tdoc-cards { grid-template-columns: 1fr; } .tdoc-hero h1 { font-size: 26px; } }

.tdoc-card {
	background: #fff; border: 1px solid var(--tdoc-line); border-radius: 16px;
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tdoc-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(18, 39, 94, .13); border-color: #cdd8f0; }
.tdoc-card__top { display: flex; gap: 16px; padding: 20px 20px 16px; align-items: flex-start; }
.tdoc-thumb {
	flex: 0 0 84px; height: 84px; border-radius: 12px; background: var(--tdoc-soft);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tdoc-thumb img { max-width: 76px; max-height: 76px; object-fit: contain; }
.tdoc-thumb .ph { font-size: 30px; color: #b9c6e6; }
.tdoc-card__name { font-size: 16px; font-weight: 700; color: var(--tdoc-dark); margin: 2px 0 6px; line-height: 1.3; }
.tdoc-card__name a { color: inherit; }
.tdoc-card__name a:hover { color: var(--tdoc-brand); }
.tdoc-card__meta { font-size: 12.5px; color: var(--tdoc-muted); }

.tdoc-dl { display: flex; flex-direction: column; gap: 10px; padding: 0 20px 20px; margin-top: auto; }
.tdoc-dl__row {
	display: flex; align-items: center; gap: 12px; border: 1px solid var(--tdoc-line);
	border-radius: 12px; padding: 11px 12px; transition: .15s; background: #fff;
}
.tdoc-dl__row:hover { transform: translateX(2px); }
.tdoc-dl__ic { flex: 0 0 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; }
.tdoc-dl__row--pass .tdoc-dl__ic { background: linear-gradient(135deg, #e74c3c, #ff7a5c); }
.tdoc-dl__row--pass:hover { color: var(--tdoc-red); box-shadow: 0 8px 18px rgba(231, 76, 60, .18); }
.tdoc-dl__row--cert .tdoc-dl__ic { background: linear-gradient(135deg, #1e9e57, #43c97e); }
.tdoc-dl__row--cert:hover { color: var(--tdoc-green); box-shadow: 0 8px 18px rgba(39, 174, 96, .18); }
.tdoc-dl__row--none { opacity: .55; color: var(--tdoc-muted); }
.tdoc-dl__row--none .tdoc-dl__ic { background: #c8cfdd; }
.tdoc-dl__txt { flex: 1; min-width: 0; }
.tdoc-dl__txt b { display: block; font-size: 14px; color: var(--tdoc-ink); }
.tdoc-dl__txt small { font-size: 12px; color: var(--tdoc-muted); }
.tdoc-dl__go { flex: 0 0 auto; opacity: .5; }
.tdoc-dl__row:hover .tdoc-dl__go { opacity: 1; }

.tdoc-empty { grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--tdoc-muted); }
.tdoc-empty b { display: block; font-size: 18px; color: var(--tdoc-dark); margin-bottom: 6px; }

/* ============================================================
   КАБИНЕТ МЕНЕДЖЕРА (.tdc-)
   ============================================================ */
html.tdc-html, body.tdc-body { margin: 0; padding: 0; }
body.tdc-body {
	background: #f4f6fb; color: #2c3440;
	font-family: Roboto, Helvetica, Arial, sans-serif;
	font-size: 14.5px;
}
.tdc-body a { color: inherit; text-decoration: none; }
/* У .tdc-body a специфичность выше, чем у .tdc-btn--primary, поэтому кнопки-ссылки
   («Добавить документы» в реестре) наследовали серый цвет текста. Возвращаем белый. */
.tdc-body a.tdc-btn--primary,
.tdc-body a.tdc-btn--primary:hover { color: #fff; }
.tdc-body * { box-sizing: border-box; }

.tdc-app { display: grid; grid-template-columns: 262px 1fr; min-height: 100vh; }
@media (max-width: 900px) { .tdc-app { grid-template-columns: 1fr; } .tdc-side { display: none; } }

/* sidebar */
.tdc-side { background: linear-gradient(180deg, #0d2255, #0b1c46); color: #c9d3ea; padding: 22px 16px; display: flex; flex-direction: column; }
.tdc-side__logo { display: flex; align-items: center; gap: 10px; padding: 6px 8px 20px; border-bottom: 1px solid rgba(255, 255, 255, .1); margin-bottom: 16px; }
/* Логотип в шапке кабинета: не более 214x25, не даём flex-контейнеру его сжимать. */
.tdc-side__logo img { box-sizing: border-box; flex: 0 0 auto; width: auto; height: auto; max-width: 214px; max-height: 25px; background: #fff; border-radius: 8px; padding: 4px 6px; display: block; }
.tdc-side__logo .fallback { font-weight: 900; color: #fff; font-size: 14px; }
.tdc-side__user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); margin-bottom: 22px; }
.tdc-avatar { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #3660bc, #5b86e0); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex: 0 0 auto; }
.tdc-side__user b { color: #fff; display: block; font-size: 13.5px; }
.tdc-side__user span { font-size: 11.5px; color: #93a1c4; }
.tdc-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 11px; color: #c1cde8; font-weight: 500; margin-bottom: 4px; transition: .15s; cursor: pointer; }
.tdc-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.tdc-nav a.is-active { background: linear-gradient(135deg, #3660bc, #2a4fa8); color: #fff; box-shadow: 0 10px 22px rgba(20, 45, 110, .5); }
.tdc-nav svg { opacity: .85; flex: 0 0 auto; }
.tdc-side__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.tdc-side__foot a { color: #93a1c4; font-size: 13px; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.tdc-side__foot a:hover { background: rgba(255, 255, 255, .07); color: #fff; }

/* main */
.tdc-main { padding: 26px 30px 60px; min-width: 0; }
.tdc-top { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.tdc-top h1 { font-size: 22px; margin: 0; color: #12275e; }
.tdc-top .tdc-grow { margin-left: auto; }
.tdc-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e8ebf2; border-radius: 999px; padding: 9px 14px; font-size: 13px; color: #55617a; }

.tdc-panel { background: #fff; border: 1px solid #e8ebf2; border-radius: 18px; padding: 24px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(18, 39, 94, .05); }
.tdc-panel h2 { font-size: 16px; margin: 0 0 4px; color: #12275e; }
.tdc-panel .tdc-sub { color: #8792a8; font-size: 13px; margin: 0 0 20px; }
.tdc-panel__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.tdc-panel__head .tdc-grow { margin-left: auto; }
.tdc-panel__head .tdc-sub { margin-bottom: 0; }
.tdc-panel__head h2 { margin-bottom: 4px; }

.tdc-flash { border-radius: 12px; padding: 13px 16px; margin-bottom: 20px; font-size: 13.5px; font-weight: 500; }
.tdc-flash--ok { background: #e7f7ee; color: #1e8a4d; border: 1px solid #bfe9d0; }
.tdc-flash--err { background: #fdeceb; color: #c0392b; border: 1px solid #f5c6c1; }

/* product picker */
.tdc-pick { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tdc-search { flex: 1 1 340px; display: flex; align-items: center; gap: 10px; border: 1.5px solid #e8ebf2; border-radius: 12px; height: 50px; padding: 0 14px; background: #fafbfe; }
.tdc-search:focus-within { border-color: #3660bc; box-shadow: 0 0 0 4px rgba(54, 96, 188, .1); background: #fff; }
.tdc-search input { border: 0; background: transparent; outline: none; font: inherit; width: 100%; }

.tdc-results { margin-top: 14px; max-height: 320px; overflow-y: auto; border: 1px solid #e8ebf2; border-radius: 14px; display: none; }
.tdc-results.is-open { display: block; }
.tdc-result { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid #f0f3f9; cursor: pointer; transition: .12s; }
.tdc-result:last-child { border-bottom: 0; }
.tdc-result:hover { background: #f4f7ff; }
.tdc-result.is-sel { background: #eef2fb; }
.tdc-result__img { width: 52px; height: 52px; border-radius: 10px; background: #f0f3f9; object-fit: contain; flex: 0 0 auto; }
.tdc-result__txt { min-width: 0; }
.tdc-result__txt b { display: block; color: #12275e; font-size: 14px; }
.tdc-result__txt small { color: #8792a8; font-size: 12px; }
.tdc-result__add { margin-left: auto; color: #3660bc; font-weight: 700; font-size: 13px; }

.tdc-selected { display: flex; align-items: center; gap: 14px; margin-top: 16px; border: 1.5px dashed #cfd8ea; border-radius: 14px; padding: 14px 16px; background: #fafbff; }
.tdc-selected.ok { border-style: solid; border-color: #bcd0f2; background: linear-gradient(90deg, #f2f6ff, #fff); }
.tdc-selected .thumb { width: 56px; height: 56px; border-radius: 12px; background: #e9eefb; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #a9b8dc; overflow: hidden; flex: 0 0 auto; }
.tdc-selected .thumb img { max-width: 52px; max-height: 52px; object-fit: contain; }
.tdc-selected b { color: #12275e; font-size: 15px; display: block; }
.tdc-selected .meta { color: #8792a8; font-size: 12.5px; }

/* dropzones */
.tdc-drops { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
@media (max-width: 760px) { .tdc-drops { grid-template-columns: 1fr; } }
.tdc-drop {
	position: relative; min-height: 216px; padding: 22px;
	border: 2px dashed #cfd8ea; border-radius: 16px; background: #fafbff;
	display: flex; align-items: center; justify-content: center; text-align: center;
	transition: border-color .18s, background .18s, box-shadow .18s;
}
.tdc-drop:hover, .tdc-drop.is-over { border-color: #3660bc; background: #f4f7ff; }
.tdc-drop.is-over { box-shadow: 0 0 0 5px rgba(54, 96, 188, .12); }
.tdc-drop input[type=file] {
	position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
	border: 0; padding: 0; margin: -1px; clip: rect(0 0 0 0);
}
.tdc-drop__pick {
	position: absolute; inset: 0; padding: 22px; cursor: pointer;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tdc-drop.filled { border-style: solid; border-color: #bcd0f2; background: #fff; text-align: left; }
.tdc-drop.filled:hover { border-color: #bcd0f2; background: #fff; }
.tdc-drop.filled .tdc-drop__pick { display: none; }
/* Атрибут hidden обязан реально скрывать элемент: у .tdc-drop__file и .tdc-drop__ex
   задан display (flex), который иначе перебивает hidden — и блок с «Файл прикреплён»,
   «Заменить», «Убрать» и иконкой PDF был виден ещё до прикрепления файла. */
.tdc-drop__file[hidden],
.tdc-drop__ex[hidden] { display: none !important; }
.tdc-drop__ic {
	width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 12px;
	display: flex; align-items: center; justify-content: center; color: #fff;
	transition: transform .18s;
}
.tdc-drop--pass .tdc-drop__ic { background: linear-gradient(135deg, #e74c3c, #ff7a5c); box-shadow: 0 10px 20px rgba(231, 76, 60, .22); }
.tdc-drop--cert .tdc-drop__ic { background: linear-gradient(135deg, #1e9e57, #43c97e); box-shadow: 0 10px 20px rgba(30, 158, 87, .22); }
.tdc-drop:hover .tdc-drop__ic { transform: translateY(-2px); }
.tdc-drop__pick b { display: block; color: #12275e; font-size: 15px; margin-bottom: 3px; }
.tdc-drop__pick small { color: #8792a8; display: block; font-size: 12.5px; }
.tdc-drop__pick .hint2 { color: #9aa5bd; font-size: 12px; margin-top: 10px; }

/* «уже загружен» под зоной выбора */
.tdc-drop__ex {
	margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
	background: #eef7f1; border: 1px solid #c9ead6; color: #1e8a4d;
	border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
}
.tdc-drop__ex svg { flex: 0 0 auto; }
.tdc-drop__ex .ex-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 168px; }
.tdc-drop__ex .ex-m { color: #48a56f; white-space: nowrap; }

/* превью прикреплённого файла */
.tdc-drop__file { width: 100%; display: flex; gap: 16px; align-items: center; text-align: left; }
.tdc-pv {
	position: relative; flex: 0 0 106px; width: 106px; height: 134px; border-radius: 12px; overflow: hidden;
	background: #eef1f8; border: 1px solid #e3e8f3; box-shadow: 0 10px 22px rgba(18, 39, 94, .12);
	display: flex; align-items: center; justify-content: center;
}
.tdc-pv canvas { display: none; max-width: 100%; max-height: 100%; }
.tdc-pv__ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #fff; }
.tdc-drop--pass .tdc-pv__ph { background: linear-gradient(160deg, #e74c3c, #c0392b); }
.tdc-drop--cert .tdc-pv__ph { background: linear-gradient(160deg, #1e9e57, #147a43); }
.tdc-pv__ph span { font-weight: 900; letter-spacing: 2px; font-size: 15px; }
.tdc-pv__ok {
	position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%;
	background: #27ae60; color: #fff; display: flex; align-items: center; justify-content: center;
	border: 2px solid #fff; box-shadow: 0 4px 10px rgba(39, 174, 96, .45);
}
.tdc-pv-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.tdc-pv-name { color: #12275e; font-size: 14px; font-weight: 700; line-height: 1.3; word-break: break-word; }
.tdc-pv-size { color: #8792a8; font-size: 12.5px; }
.tdc-pv-badge { display: inline-flex; align-items: center; gap: 6px; color: #1e8a4d; font-size: 12px; font-weight: 700; margin-top: 4px; }
.tdc-pv-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tdc-pv-acts .tdc-btn { padding: 9px 15px; font-size: 12.5px; }

/* подсказка + заблокированная кнопка сохранения */
.tdc-save-hint { align-self: center; margin-right: auto; color: #8792a8; font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; }
.tdc-save-hint.ok { color: #1e8a4d; font-weight: 600; }
.tdc-btn--primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; filter: none; transform: none; }
.tdc-btn--primary:disabled:hover { filter: none; transform: none; }

.tdc-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.tdc-btn { border: 0; border-radius: 12px; padding: 14px 26px; font: inherit; font-weight: 700; cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 8px; }
.tdc-btn--primary { color: #fff; background: linear-gradient(135deg, #3660bc, #24479a); box-shadow: 0 12px 26px rgba(54, 96, 188, .28); }
.tdc-btn--primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.tdc-btn--ghost { background: #fff; border: 1.5px solid #e8ebf2; color: #55617a; }
.tdc-btn--ghost:hover { border-color: #3660bc; color: #12275e; }
.tdc-btn--danger { background: #fff; border: 1.5px solid #f5c6c1; color: #c0392b; }
.tdc-btn--danger:hover { background: #fdf1f0; }

/* registry table */
.tdc-tablewrap { overflow-x: auto; }
.tdc-body table.tdc-table { width: 100%; border-collapse: collapse; min-width: 780px; }
.tdc-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #8792a8; padding: 0 14px 12px; font-weight: 700; }
.tdc-table td { padding: 14px; border-top: 1px solid #e8ebf2; vertical-align: middle; }
.tdc-table tr:hover td { background: #fafbff; }
.tdc-pname { font-weight: 600; color: #12275e; }
.tdc-pcode { color: #8792a8; font-size: 12px; }
.tdc-pimg { width: 46px; height: 46px; border-radius: 10px; background: #f0f3f9; object-fit: contain; vertical-align: middle; margin-right: 12px; }
.tdc-doc-cell { display: flex; align-items: center; gap: 11px; }
.tdc-doc-ic { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.tdc-doc-ic.p { background: linear-gradient(135deg, #e74c3c, #ff7a5c); }
.tdc-doc-ic.c { background: linear-gradient(135deg, #1e9e57, #43c97e); }
.tdc-doc-cell b { font-size: 13px; display: block; }
.tdc-doc-cell small { color: #8792a8; font-size: 11.5px; }
.tdc-date { font-size: 12.5px; color: #55617a; display: inline-flex; align-items: center; gap: 6px; }
.tdc-date.fresh { color: #27ae60; font-weight: 600; }
.tdc-date.old { color: #e74c3c; font-weight: 600; }
.tdc-pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.tdc-pill--ok { background: #e7f7ee; color: #1e8a4d; }
.tdc-pill--todo { background: #fdeceb; color: #c0392b; }
.tdc-rowact { display: flex; gap: 8px; }
.tdc-iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e8ebf2; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #6b7690; transition: .15s; }
.tdc-iconbtn:hover { border-color: #3660bc; color: #3660bc; background: #f4f7ff; }
.tdc-iconbtn.del:hover { border-color: #e74c3c; color: #e74c3c; background: #fdf1f0; }
.tdc-legend { display: flex; gap: 18px; flex-wrap: wrap; color: #8792a8; font-size: 12.5px; margin-top: 14px; }
.tdc-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tdc-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.tdc-muted { color: #8792a8; font-size: 12.5px; }
.tdc-empty { text-align: center; color: #8792a8; padding: 40px 10px; }

/* forms (настройки) */
.tdc-field { margin-bottom: 16px; }
.tdc-field label { display: block; font-size: 13px; font-weight: 600; color: #55617a; margin-bottom: 7px; }
.tdc-inp { display: flex; align-items: center; gap: 10px; border: 1.5px solid #e8ebf2; border-radius: 12px; height: 50px; padding: 0 14px; transition: .15s; background: #fafbfe; }
.tdc-inp:focus-within { border-color: #3660bc; box-shadow: 0 0 0 4px rgba(54, 96, 188, .12); background: #fff; }
.tdc-inp input { border: 0; background: transparent; outline: none; font: inherit; width: 100%; color: #2c3440; }
.tdc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .tdc-cols { grid-template-columns: 1fr; } }
.tdc-hr { border: 0; border-top: 1px solid #e8ebf2; margin: 24px 0; }

/* вкладки внутри кабинета */
.tdc-tabpane { display: none; }
.tdc-tabpane.is-active { display: block; }

/* Login */
.tdc-login-stage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px;
	background: radial-gradient(1200px 600px at 15% 10%, #1b3a86 0%, #0b1c46 45%, #070f28 100%); position: relative; overflow: hidden; }
.tdc-login-stage:after { content: ""; position: absolute; right: -120px; top: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 208, 68, .16), transparent 62%); }
.tdc-login-stage:before { content: ""; position: absolute; left: -140px; bottom: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(54, 96, 188, .5), transparent 65%); }
.tdc-login-card { position: relative; z-index: 2; width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 40px 38px 34px; box-shadow: 0 40px 90px rgba(3, 10, 30, .5); }
.tdc-login-card__logo { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
/* Логотип на странице входа: не более 330x25. */
.tdc-login-card__logo img { box-sizing: border-box; flex: 0 0 auto; width: auto; height: auto; max-width: 330px; max-height: 25px; display: block; }
.tdc-login-card__logo .fallback { font-weight: 900; font-size: 18px; color: #12275e; letter-spacing: .5px; }
.tdc-login-card h1 { font-size: 20px; text-align: center; margin: 16px 0 4px; color: #12275e; font-weight: 800; }
.tdc-login-card p { text-align: center; color: #8792a8; font-size: 13.5px; margin: 0 0 26px; }
.tdc-login-hint { text-align: center; color: #8792a8; font-size: 12px; margin-top: 18px; }
.tdc-login-badge { display: flex; align-items: center; justify-content: center; gap: 8px; color: #98a3b8; font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; margin-top: 26px; border-top: 1px solid #e8ebf2; padding-top: 18px; }

@media (max-width: 900px) {
	.tdc-main { padding: 20px 16px 50px; }
	.tdc-mobile-nav { display: flex !important; }
}
.tdc-mobile-nav { display: none; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tdc-mobile-nav a { padding: 9px 14px; border-radius: 10px; background: #fff; border: 1px solid #e8ebf2; font-size: 13px; font-weight: 600; color: #55617a; }
.tdc-mobile-nav a.is-active { background: #12275e; color: #fff; border-color: #12275e; }

/* ============================================================
   АРХИВ ДОКУМЕНТАЦИИ (снятые с производства товары)
   ============================================================ */

/* кабинет менеджера */
.tdc-panel--arch { border-top: 3px solid #dfe5f2; }
.tdc-arch-ic {
	width: 46px; height: 46px; border-radius: 10px; background: #eef1f8;
	display: inline-flex; align-items: center; justify-content: center;
	vertical-align: middle; margin-right: 12px;
}
.tdc-pill--arch { background: #eef1f8; color: #4a5b7d; }

/* публичная страница /technical-documentation */
.tdoc-arch { padding-bottom: 34px; }
.tdoc-arch__head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.tdoc-arch__head h2 { margin: 0 0 6px; font-size: 22px; font-weight: 900; color: var(--tdoc-dark); }
.tdoc-arch__note { margin: 0; color: var(--tdoc-muted); font-size: 13.5px; max-width: 720px; }
.tdoc-arch__badge {
	margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
	background: #eef1f8; color: #4a5b7d; border-radius: 999px; padding: 8px 14px;
	font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.tdoc-card--arch { border-color: #e2e7f2; }
.tdoc-card--arch .tdoc-card__name { color: #3c4c6d; }
.tdoc-thumb--arch { background: #eef1f8; }

/* ============================================================
   v3.0 — РАЗДЕЛЫ (БЛОКИ) И МЕНЮ ВЫБОРКИ НА ПУБЛИЧНОЙ СТРАНИЦЕ
   ============================================================ */
/* --- Меню выборки разделов: официальная панель с крупными «чипами» --- */
.tdoc-filterbar { margin: 0 0 26px; }
.tdoc-nav {
	display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
	padding: 16px 18px; margin: 0;
	background: #fff; border: 1px solid var(--tdoc-line); border-radius: 16px;
	box-shadow: 0 12px 30px rgba(18, 39, 94, .07);
}
.tdoc-nav__label {
	flex: 0 0 100%; display: inline-flex; align-items: center; gap: 8px;
	font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
	color: #8a93a8; margin-bottom: 4px; padding-left: 4px;
}
.tdoc-nav__label svg { color: var(--tdoc-brand); }
.tdoc-chip {
	display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
	background: linear-gradient(180deg, #ffffff, #f3f6fd);
	border: 1px solid #dfe5f2; color: #33415c;
	border-radius: 12px; padding: 12px 17px; font: inherit; font-size: 14px; font-weight: 700;
	transition: transform .16s, box-shadow .16s, border-color .16s, background .16s, color .16s;
	box-shadow: 0 2px 6px rgba(18, 39, 94, .04);
}
.tdoc-chip__ic { flex: 0 0 auto; color: #6b7ba3; transition: color .16s; }
.tdoc-chip i {
	font-style: normal; font-size: 12px; font-weight: 800; color: #4a63a8;
	background: #e8eefb; border-radius: 999px; padding: 2px 9px; line-height: 1.5;
}
.tdoc-chip:hover { border-color: var(--tdoc-brand); color: var(--tdoc-brand); transform: translateY(-2px); box-shadow: 0 12px 24px rgba(54, 96, 188, .16); }
.tdoc-chip:hover .tdoc-chip__ic { color: var(--tdoc-brand); }
.tdoc-chip.is-active {
	background: linear-gradient(135deg, #12275e 0%, #2b4fa8 55%, #3660bc 100%);
	border-color: transparent; color: #fff; box-shadow: 0 14px 28px rgba(43, 79, 168, .35);
}
.tdoc-chip.is-active .tdoc-chip__ic { color: #cfe0ff; }
.tdoc-chip.is-active i { background: rgba(255, 255, 255, .22); color: #fff; }
.tdoc-chip--arch { background: linear-gradient(180deg, #fff, #f4f6fa); }
.tdoc-chip--arch.is-active { background: linear-gradient(135deg, #33415c, #12275e); }

/* --- Раздел (блок): выраженная «шапка» + карточка-контейнер --- */
.tdoc-block { margin-bottom: 40px; }
.tdoc-block[hidden] { display: none; }
.tdoc-block__head {
	display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden;
	padding: 15px 22px; border-radius: 16px 16px 0 0;
	background: linear-gradient(120deg, #0d1f4d 0%, #2b4fa8 58%, #3660bc 100%);
	color: #fff; box-shadow: 0 14px 30px rgba(18, 39, 94, .2);
}
.tdoc-block__head:after {
	content: ""; position: absolute; right: -40px; top: -70px; width: 240px; height: 240px;
	border-radius: 50%; background: radial-gradient(circle, rgba(255, 208, 68, .22), transparent 65%);
}
.tdoc-block__title { position: relative; z-index: 2; margin: 0; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: .2px; }
.tdoc-block__title:before {
	content: ""; display: inline-block; width: 5px; height: 20px; border-radius: 3px;
	background: linear-gradient(180deg, #ffd044, #ffb300); vertical-align: -3px; margin-right: 12px;
}
.tdoc-block__badge {
	position: relative; z-index: 2; background: rgba(255, 255, 255, .16); color: #fff;
	border: 1px solid rgba(255, 255, 255, .2); font-weight: 800; font-size: 12px;
	border-radius: 999px; padding: 4px 12px;
}
.tdoc-block__body {
	background: #fff; border: 1px solid var(--tdoc-line); border-top: 0;
	border-radius: 0 0 16px 16px; padding: 22px; box-shadow: 0 20px 44px rgba(18, 39, 94, .07);
}
.tdoc-block--arch .tdoc-block__head { background: linear-gradient(120deg, #2a3348 0%, #46536e 100%); box-shadow: 0 14px 30px rgba(52, 65, 92, .2); }
.tdoc-block--arch .tdoc-block__title:before { background: linear-gradient(180deg, #c3cde0, #93a1c4); }

/* --- Переключатель вида отображения (таблица / плитка) --- */
.tdoc-viewtoggle { display: inline-flex; gap: 4px; background: #eef1f8; border-radius: 12px; padding: 4px; margin-left: auto; }
.tdoc-viewtoggle__btn {
	border: 0; background: transparent; border-radius: 9px; width: 44px; height: 40px;
	display: inline-flex; align-items: center; justify-content: center; color: #7b8494;
	cursor: pointer; transition: .15s;
}
.tdoc-viewtoggle__btn:hover { color: var(--tdoc-brand); }
.tdoc-viewtoggle__btn.is-active { background: #fff; color: var(--tdoc-dark); box-shadow: 0 6px 16px rgba(18, 39, 94, .14); }

/* Переключение вида: контейнер .tdoc-page получает класс tdoc-view-table / tdoc-view-cards */
.tdoc-view-table .tdoc-cards { display: none; }
.tdoc-view-cards .tdoc-tablewrap { display: none; }

/* --- Табличный вид на публичной странице --- */
.tdoc-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tdoc-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
.tdoc-table thead th {
	text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px;
	color: #7b8494; font-weight: 800; padding: 13px 16px; background: #f4f6fc;
	border-bottom: 1px solid var(--tdoc-line); white-space: nowrap;
}
.tdoc-table thead th:first-child { border-radius: 10px 0 0 10px; }
.tdoc-table thead th:last-child { border-radius: 0 10px 10px 0; }
.tdoc-table td { padding: 14px 16px; border-bottom: 1px solid #eef1f8; vertical-align: middle; }
.tdoc-table tbody tr:last-child td { border-bottom: 0; }
.tdoc-table tbody tr { transition: background .14s; }
.tdoc-table tbody tr:hover td { background: #f6f9ff; }
.tdoc-tcellpos { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tdoc-tthumb {
	flex: 0 0 50px; width: 50px; height: 50px; border-radius: 11px; background: var(--tdoc-soft);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tdoc-tthumb img { max-width: 44px; max-height: 44px; object-fit: contain; }
.tdoc-tname { font-weight: 700; color: var(--tdoc-dark); font-size: 14.5px; line-height: 1.3; }
.tdoc-tname a { color: inherit; }
.tdoc-tname a:hover { color: var(--tdoc-brand); }
.tdoc-tmeta { font-size: 12px; color: var(--tdoc-muted); margin-top: 2px; }
.tdoc-file {
	display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
	background: #fff; border: 1px solid var(--tdoc-line); border-radius: 10px;
	padding: 9px 13px; font-size: 13px; font-weight: 700; color: #3a4a6b;
	transition: .16s;
}
.tdoc-file small { color: var(--tdoc-muted); font-weight: 700; }
.tdoc-file svg { flex: 0 0 auto; }
.tdoc-file__dl { opacity: .45; transition: .16s; }
.tdoc-file:hover .tdoc-file__dl { opacity: 1; }
.tdoc-file--pass:hover { border-color: var(--tdoc-red); color: var(--tdoc-red); box-shadow: 0 8px 18px rgba(231, 76, 60, .16); }
.tdoc-file--cert:hover { border-color: var(--tdoc-green); color: var(--tdoc-green); box-shadow: 0 8px 18px rgba(39, 174, 96, .16); }
.tdoc-file--none { display: inline-flex; align-items: center; gap: 8px; color: #b3bccd; font-size: 12.5px; }
.tdoc-file--none svg { opacity: .7; }

/* ============================================================
   v3.0 — КАБИНЕТ: КАРТОЧКИ РЕЕСТРА, РЕДАКТИРОВАНИЕ, РАЗДЕЛЫ
   ============================================================ */
.tdc-toolbar2 { margin-bottom: 14px; }
.tdc-search--sm { height: 44px; }

/* Переключатель вида реестра: таблица / плитка */
.tdc-viewtoggle { display: inline-flex; gap: 4px; background: #eef1f8; border-radius: 12px; padding: 4px; }
.tdc-viewtoggle button {
	border: 0; background: transparent; border-radius: 9px; width: 42px; height: 38px;
	display: inline-flex; align-items: center; justify-content: center; color: #7b8494;
	cursor: pointer; transition: .15s;
}
.tdc-viewtoggle button:hover { color: #3660bc; }
.tdc-viewtoggle button.is-active { background: #fff; color: #12275e; box-shadow: 0 6px 16px rgba(18, 39, 94, .14); }

.tdc-registry.is-table .tdc-rcards { display: none; }
.tdc-registry.is-cards .tdc-regtable { display: none; }

/* сетка карточек реестра — компактная, ровно 3 в ряд */
.tdc-rcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 1200px) { .tdc-rcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .tdc-rcards { grid-template-columns: 1fr; } }
.tdc-rcard {
	display: flex; gap: 12px; align-items: center; background: #fff;
	border: 1px solid #e8ebf2; border-radius: 14px; padding: 12px;
	transition: transform .16s, box-shadow .16s, border-color .16s;
}
.tdc-rcard:hover { border-color: #cdd8f0; box-shadow: 0 12px 26px rgba(18, 39, 94, .1); transform: translateY(-2px); }
.tdc-rcard__img {
	flex: 0 0 50px; width: 50px; height: 50px; border-radius: 11px; background: #f0f3f9;
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.tdc-rcard__img img { max-width: 44px; max-height: 44px; object-fit: contain; }
.tdc-rcard__body { min-width: 0; flex: 1; }
.tdc-rcard__name { font-weight: 700; color: #12275e; font-size: 13.5px; line-height: 1.25; }
.tdc-rcard__meta { color: #8792a8; font-size: 11.5px; margin-top: 2px; }
.tdc-rcard__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.tdc-rcard__tags .tdc-tag2 { font-size: 10px; padding: 2px 7px; }
.tdc-rcard__foot { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.tdc-rcard__date { color: #8792a8; font-size: 10.5px; line-height: 1.2; white-space: nowrap; }
.tdc-update { color: #8792a8; font-size: 12px; white-space: nowrap; }
.tdc-rcard__edit {
	width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 10px; border: 1px solid #e2e8f4; background: #f7f9fd; color: #4a63a8;
	cursor: pointer; transition: .15s;
}
.tdc-rcard__edit:hover { background: #12275e; border-color: #12275e; color: #fff; box-shadow: 0 8px 18px rgba(18, 39, 94, .22); }
.tdc-rcard--arch { border-style: dashed; }
.tdc-rcard--arch .tdc-rcard__img { background: #eef1f8; }

/* Табличный вид реестра */
.tdc-regtable { margin-bottom: 26px; background: #fff; border: 1px solid #e8ebf2; border-radius: 16px; padding: 6px 8px; box-shadow: 0 12px 30px rgba(18, 39, 94, .05); }
.tdc-rtable { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; }
.tdc-rtable thead th {
	text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
	color: #7b8494; font-weight: 800; padding: 12px 14px; background: #f4f6fc;
	border-bottom: 1px solid #e8ebf2; white-space: nowrap;
}
.tdc-rtable thead th:first-child { border-radius: 10px 0 0 10px; }
.tdc-rtable thead th:last-child { border-radius: 0 10px 10px 0; }
.tdc-rtable td { padding: 12px 14px; border-bottom: 1px solid #eef1f8; vertical-align: middle; }
.tdc-rtable tbody tr:last-child td { border-bottom: 0; }
.tdc-rtable tbody tr:hover td { background: #f6f9ff; }
.tdc-cellpos { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tdc-cellpos .tdc-rcard__img { flex: 0 0 46px; width: 46px; height: 46px; }
.tdc-cellpos .tdc-rcard__img img { max-width: 40px; max-height: 40px; }
.tdc-cellpos .tdc-rcard__name { font-size: 14px; }
.tdc-regtable .tdc-rcard__edit { margin-left: 0; }
.tdc-rowact { display: flex; justify-content: flex-end; }

.tdc-tag2 { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; background: #eef2fb; color: #4a63a8; }
.tdc-tag2--pass { background: #fdeceb; color: #c0392b; }
.tdc-tag2--cert { background: #e7f7ee; color: #1e8a4d; }
.tdc-tag2--arch { background: #eef1f8; color: #4a5b7d; }
.tdc-tag2--off { background: #f1f3f8; color: #9aa5bd; }

/* бейдж-ссылка «паспорт» / «сертификат» — скачивание файла из реестра */
a.tdc-tag2.tdc-dl { text-decoration: none; align-items: center; gap: 4px; display: inline-flex; transition: filter .15s ease, transform .15s ease, box-shadow .15s ease; }
a.tdc-tag2.tdc-dl svg { flex: 0 0 auto; opacity: .85; }
a.tdc-tag2.tdc-dl:hover { filter: brightness(.95); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(18, 39, 94, .18); }
a.tdc-tag2.tdc-dl:active { transform: translateY(0); }

/* списки «применяется к позициям»: отметки уже применённых */
.tdc-share__item.is-applied { background: #f2faf5; }
.tdc-share__item.is-applied span { font-weight: 600; }
.tdc-share__item.is-checked { background: #eefaf2; }
.tdc-share__applied { font-style: normal; font-size: 10px; font-weight: 700; color: #1e8a4d; background: #dff3e7; border-radius: 999px; padding: 1px 7px; margin-left: 6px; white-space: nowrap; }
.tdc-share__count { font-weight: 700; font-size: 12px; color: #1e8a4d; margin-left: 6px; }

/* переключатель режима добавления */
.tdc-switch { display: inline-flex; gap: 6px; background: #eef1f8; border-radius: 12px; padding: 5px; }
.tdc-switch button {
	border: 0; background: transparent; border-radius: 9px; padding: 10px 20px;
	font: inherit; font-weight: 700; color: #55617a; cursor: pointer; transition: .15s;
}
.tdc-switch button.is-active { background: #fff; color: #12275e; box-shadow: 0 6px 16px rgba(18, 39, 94, .12); }

/* поля с файлами и превью картинки */
.tdc-inp--file { height: auto; padding: 10px 12px; }
.tdc-inp--file input[type=file] { font-size: 13px; }
.tdc-imgprev { margin: 0; }
.tdc-imgprev img { max-width: 150px; max-height: 140px; border-radius: 12px; border: 1px solid #e8ebf2; background: #f7f9fd; object-fit: contain; padding: 4px; }
.tdc-imgpick { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

.tdc-select {
	width: 100%; height: 48px; border: 1.5px solid #e8ebf2; border-radius: 12px;
	background: #fafbfe; padding: 0 12px; font: inherit; color: #2c3440; outline: none;
}
.tdc-select:focus { border-color: #3660bc; background: #fff; box-shadow: 0 0 0 4px rgba(54, 96, 188, .1); }

/* настройки разделов */
.tdc-brow {
	display: grid; grid-template-columns: 1.4fr 1fr 110px auto; gap: 16px; align-items: end;
	padding: 16px 0; border-top: 1px solid #eef1f8;
}
.tdc-brow:first-child { border-top: 0; }
.tdc-brow .tdc-field { margin-bottom: 0; }
.tdc-brow__order input { text-align: center; }
.tdc-brow__del { padding-bottom: 15px; }
.tdc-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #55617a; cursor: pointer; }
.tdc-check input { width: 16px; height: 16px; }
@media (max-width: 900px) {
	.tdc-brow { grid-template-columns: 1fr; gap: 12px; }
	.tdc-brow__del { padding-bottom: 0; }
}

/* модальное окно редактирования карточки */
.tdc-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; }
.tdc-modal[hidden] { display: none; }
.tdc-modal__bd { position: absolute; inset: 0; background: rgba(9, 18, 40, .55); }
.tdc-modal__box {
	position: relative; z-index: 2; width: 100%; max-width: 800px; background: #f7f9fd;
	border-radius: 20px; box-shadow: 0 40px 90px rgba(3, 10, 30, .5);
	display: flex; flex-direction: column; max-height: calc(100vh - 48px); overflow: hidden;
}
/* Форма — единственный flex-элемент бокса: делаем её flex-колонкой,
   иначе шапка/тело/футер не ужимаются и кнопка «Сохранить» уезжает за край. */
.tdc-modal__box > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.tdc-modal__head { flex: 0 0 auto; display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px; border-bottom: 1px solid #e8ebf2; background: #fff; }
.tdc-modal__head h2 { margin: 0 0 3px; font-size: 18px; color: #12275e; }
.tdc-modal__x {
	margin-left: auto; width: 38px; height: 38px; border-radius: 10px; border: 1px solid #e8ebf2;
	background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #6b7690;
}
.tdc-modal__x:hover { border-color: #e74c3c; color: #e74c3c; }
/* Тело модалки — гибкий скроллируемый контейнер: min-height:0 позволяет ему
   ужиматься внутри flex-колонки, поэтому футер с «Сохранить» всегда виден. */
.tdc-modal__body { flex: 1 1 auto; min-height: 0; padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; }
.tdc-modal__foot { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid #e8ebf2; background: #fff; box-shadow: 0 -8px 22px rgba(18, 39, 94, .07); }
.tdc-modal__foot .tdc-btn--primary { padding: 14px 30px; font-size: 15px; }
.tdc-modal__foot .tdc-grow { flex: 1; }

.tdc-docbox { background: #fff; border: 1px solid #e8ebf2; border-radius: 16px; padding: 18px; margin-bottom: 18px; }
.tdc-docbox--pass { border-top: 3px solid #e74c3c; }
.tdc-docbox--cert { border-top: 3px solid #1e9e57; }
.tdc-docbox__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tdc-docbox__head b { display: block; color: #12275e; font-size: 15px; }
.tdc-docbox__head small { color: #8792a8; font-size: 12.5px; }

.tdc-share { margin-top: 14px; border-top: 1px dashed #e3e8f3; padding-top: 14px; }
.tdc-share__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tdc-share__top b { font-size: 13px; color: #55617a; }
.tdc-share__filter {
	flex: 1 1 200px; height: 38px; border: 1.5px solid #e8ebf2; border-radius: 10px;
	padding: 0 12px; font: inherit; background: #fafbfe; outline: none;
}
.tdc-share__filter:focus { border-color: #3660bc; background: #fff; }
.tdc-share__list { max-height: 220px; overflow-y: auto; border: 1px solid #eef1f8; border-radius: 12px; padding: 6px; }
.tdc-share__item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; color: #2c3440; cursor: pointer; }
.tdc-share__item:hover { background: #f4f7ff; }
.tdc-share__item input { width: 16px; height: 16px; flex: 0 0 auto; }
.tdc-share__item span { flex: 1; min-width: 0; }
.tdc-share__item i { font-style: normal; font-size: 11px; font-weight: 700; color: #4a5b7d; background: #eef1f8; border-radius: 999px; padding: 2px 8px; }
