/*
 * Кабинет руководителя (cp): цвета и блоки из макетов pen.dev поверх темы Filament.
 * Подключается в CpPanelProvider (HEAD_END). Свои блоки — только внутри .ive.
 */
:root {
  --ive-pink: #F8075C; --ive-pink-dark: #D90048; --ive-pink-soft: #FFF0F5;
  --ive-ink: #141418; --ive-ink-2: #5B5B66; --ive-ink-3: #A9A9B4;
  --ive-line: #E7E7EA; --ive-bg: #fff; --ive-bg-2: #F6F6F8;
  --ive-green: #189858; --ive-green-dark: #117A47; --ive-green-soft: #E8F6EE;
  --ive-ok: #34C17B; --ive-late: #F2A93B; --ive-late-text: #B7791F; --ive-late-soft: #FFF4DC; --ive-warn-text: #8A5A12;
  --ive-agreed: #7C93F5; --ive-absent: #E5484D; --ive-bad-text: #B42318; --ive-bad-soft: #FEECEB;
  --ive-wait: #BFC3CC; --ive-plan: #C9C9D1; --ive-today-row: #FFF7FA;
  --ive-blue-soft: #EAF1FE; --ive-blue: #1F4FB8; --ive-blue-line: #BFD3FB;
}
.dark {
  --ive-ink: #F4F4F6; --ive-ink-2: #B4B4BE; --ive-ink-3: #7A7A86;
  --ive-line: #2E2E35; --ive-bg: #18181B; --ive-bg-2: #232328; --ive-pink-soft: #3A1426;
  --ive-green-soft: #12301F; --ive-late-soft: #3A2C10; --ive-bad-soft: #3A1715; --ive-today-row: #24161C;
  --ive-blue-soft: #16223D; --ive-blue: #9DB7F5; --ive-blue-line: #2C3E66;
}

/* Общий вид панели: фон, меню, заголовки — как в макетах */
html:not(.dark) .fi-body, html:not(.dark) .fi-main-ctn { background: var(--ive-bg-2); }
html:not(.dark) .fi-sidebar, html:not(.dark) .fi-sidebar-header, html:not(.dark) .fi-topbar > nav, html:not(.dark) .fi-topbar { background: var(--ive-bg); }
.fi-sidebar-group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ive-ink-3); }
html:not(.dark) .fi-sidebar-item-btn { border-radius: 12px; }
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--ive-pink-soft); }
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
html:not(.dark) .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-icon { color: var(--ive-pink); font-weight: 700; }
.fi-header-heading { font-weight: 800; letter-spacing: -.01em; }
/* Основные кнопки — насыщенный розовый с белым текстом, как в макетах */
.fi-btn.fi-color-primary:not(.fi-outlined) { background: var(--ive-pink) !important; color: #fff !important; }
.fi-btn.fi-color-primary:not(.fi-outlined):hover { background: var(--ive-pink-dark) !important; }
.fi-btn.fi-color-primary:not(.fi-outlined) .fi-icon { color: #fff !important; }

/* ---------- Табель и график ---------- */
.ive { color: var(--ive-ink); font-size: 14px; display: flex; flex-direction: column; gap: 18px; }
.ive a { color: inherit; text-decoration: none; }
.ive button { font: inherit; cursor: pointer; }

/* Шапка страницы */
.ive-head { display: flex; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ive-head__title { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--ive-ink); letter-spacing: -.01em; }
.ive-head__sub { margin: 4px 0 0; font-size: 15px; color: var(--ive-ink-2); }
.ive-head > div:first-child { flex: 1 1 300px; min-width: 0; }
.ive-head__actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ive-head__actions .fi-ac { gap: 10px; }
.ive-head__actions .fi-btn { border-radius: 12px; min-height: 42px; padding: 10px 14px; font-size: 14px; font-weight: 600; box-shadow: none; }
html:not(.dark) .ive-head__actions .fi-btn.fi-color-gray, html:not(.dark) .ive-head__actions .fi-btn:not(.fi-color) { background: var(--ive-bg); border: 1px solid var(--ive-line); color: var(--ive-ink); }

.ive-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--ive-bg); }
.ive-seg button, .ive-seg a { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ive-ink-2); }
.ive-seg .is-on { background: var(--ive-ink); color: var(--ive-bg); }
.ive-ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--ive-line); background: var(--ive-bg); font-size: 14px; font-weight: 600; color: var(--ive-ink); white-space: nowrap; }
.ive-ctl svg { width: 16px; height: 16px; color: var(--ive-ink-2); flex: none; }
.ive-ctl--icon { padding: 0; width: 42px; justify-content: center; }
.ive-ctl--pink { background: var(--ive-pink); border-color: var(--ive-pink); color: #fff; }
.ive-ctl--pink svg { color: #fff; }
.ive-month { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--ive-line); border-radius: 12px; background: var(--ive-bg); overflow: hidden; }
.ive-month button { border: 0; background: transparent; width: 36px; min-height: 40px; display: flex; align-items: center; justify-content: center; color: var(--ive-ink-2); }
.ive-month button:hover { background: var(--ive-bg-2); }
.ive-month span { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ive-month svg { width: 16px; height: 16px; color: var(--ive-ink-2); }

.ive-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--ive-line); }
.ive-tabs a { padding-bottom: 10px; font-size: 15px; font-weight: 500; color: var(--ive-ink-2); margin-bottom: -1px; }
.ive-tabs a.is-on { color: var(--ive-ink); font-weight: 700; border-bottom: 2px solid var(--ive-pink); }

.ive-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13px; color: var(--ive-ink-2); }
.ive-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ive-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.ive-legend--dots { gap: 6px 14px; font-size: 12px; }
.ive-legend--dots span { gap: 5px; }
.ive-legend--dots i { width: 8px; height: 8px; border-radius: 50%; }
.ive-legend--dots i.sq { width: 12px; height: 12px; border-radius: 3px; }
.ive-legend__note { margin-left: auto; color: var(--ive-ink-3); font-weight: 500; }

.ive-panel { background: var(--ive-bg); border-radius: 20px; padding: 18px 20px; min-width: 0; }
.ive-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; }
.ive-panel__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--ive-ink); }
.ive-panel__count { font-size: 14px; font-weight: 600; color: var(--ive-pink); }
.ive-cols { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.ive-cols--card { grid-template-columns: minmax(0, 1fr) 360px; }
.ive-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; }
@media (max-width: 1280px) { .ive-cols, .ive-cols--card { grid-template-columns: minmax(0, 1fr); } .ive-side { position: static; } }

/* Статусы */
.ive-st { --c: var(--ive-ok); }
.ive-st--late { --c: var(--ive-late); }
.ive-st--late_agreed { --c: var(--ive-agreed); }
.ive-st--pending { --c: var(--ive-wait); }
.ive-st--absent { --c: var(--ive-absent); }

/* Табель по сотрудникам */
.ive-grid { background: var(--ive-bg); border-radius: 20px; padding: 14px 20px 6px; overflow-x: auto; }
.ive-grid table { border-collapse: collapse; width: 100%; min-width: max-content; }
.ive-grid th, .ive-grid td { padding: 0; border-bottom: 1px solid var(--ive-line); }
.ive-grid tbody tr:last-child td, .ive-grid tbody tr:last-child th { border-bottom: 0; }
.ive-grid thead th { padding: 6px 0; font-size: 12px; font-weight: 600; color: var(--ive-ink-3); text-align: left; }
.ive-grid thead th.d { width: 27px; min-width: 27px; text-align: center; }
.ive-grid thead th.d b { display: block; font-size: 12px; font-weight: 700; color: var(--ive-ink); }
.ive-grid thead th.d small { display: block; font-size: 10px; font-weight: 400; color: var(--ive-ink-3); }
.ive-grid thead th.d.is-off b { color: var(--ive-ink-3); }
.ive-grid thead th.d.is-today b, .ive-grid thead th.d.is-today small { color: var(--ive-pink); }
.ive-grid tbody th { padding: 9px 12px 9px 0; text-align: left; font-weight: 400; width: 190px; min-width: 190px; position: sticky; left: 0; background: var(--ive-bg); z-index: 1; }
.ive-grid .who b { display: block; font-size: 14px; font-weight: 600; color: var(--ive-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.ive-grid .who small { display: block; font-size: 12px; color: var(--ive-ink-3); white-space: nowrap; }
.ive-grid td.d { text-align: center; height: 52px; }
.ive-sq { display: inline-block; width: 22px; height: 22px; border-radius: 6px; vertical-align: middle; border: 0; padding: 0; background: var(--c); }
button.ive-sq:hover { outline: 2px solid var(--ive-line); outline-offset: 1px; }
.ive-sq.is-today { box-shadow: 0 0 0 2px var(--ive-ink) inset; }
.ive-sq.is-picked { outline: 2px solid var(--ive-pink); outline-offset: 2px; }
.ive-sq--plan { background: var(--ive-bg); box-shadow: inset 0 0 0 1.5px var(--ive-plan); }
.ive-grid td.sum { width: 110px; min-width: 110px; padding-left: 12px; text-align: left; white-space: nowrap; }
.ive-grid td.sum b { font-size: 14px; font-weight: 700; color: var(--ive-ink); }
.ive-grid td.sum b.is-bad { color: var(--ive-bad-text); }
.ive-grid td.sum small { display: block; font-size: 11px; color: var(--ive-ink-3); }
.ive-grid tfoot td, .ive-grid tfoot th { border-bottom: 0; border-top: 1px solid var(--ive-line); padding: 10px 0; font-size: 13px; color: var(--ive-ink-2); }
.ive-empty { padding: 28px 0; text-align: center; color: var(--ive-ink-3); font-size: 14px; }

/* Ждут решения */
.ive-wait { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--ive-line); }
.ive-wait:first-of-type { border-top: 0; }
.ive-thumb { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--ive-bg-2); color: var(--ive-ink-3); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 0; padding: 0; }
.ive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ive-thumb svg { width: 22px; height: 22px; }
.ive-wait__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; padding: 0; }
.ive-wait__text b { font-size: 15px; font-weight: 700; color: var(--ive-ink); }
.ive-wait__text span { font-size: 13px; color: var(--ive-ink-2); }
.ive-wait__text em { font-style: normal; font-size: 13px; color: var(--ive-ink); }
.ive-wait__text em.is-muted { color: var(--ive-ink-3); }
.ive-wait__text em.is-warn { color: var(--ive-warn-text); }
.ive-btns { display: flex; gap: 8px; flex: none; }
.ive-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--ive-line); background: var(--ive-bg); color: var(--ive-ink); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ive-btn svg { width: 16px; height: 16px; color: var(--ive-ink-2); }
.ive-btn:hover { background: var(--ive-bg-2); }
.ive-btn--pink { background: var(--ive-pink); border-color: var(--ive-pink); color: #fff; font-weight: 700; }
.ive-btn--pink svg { color: #fff; }
.ive-btn--pink:hover { background: var(--ive-pink-dark); }
.ive-btn--wide { flex: 1; padding: 11px 12px; }
.ive-more { display: block; padding-top: 10px; border-top: 1px solid var(--ive-line); font-size: 14px; font-weight: 600; color: var(--ive-pink) !important; }

/* Карточка выхода */
.ive-card { display: flex; flex-direction: column; gap: 12px; }
.ive-card__sub { margin: 2px 0 0; font-size: 13px; color: var(--ive-ink-2); }
.ive-card__media { display: flex; gap: 14px; }
.ive-card--top .ive-card__media { flex-direction: column; }
.ive-photo { flex: none; width: 120px; height: 150px; border-radius: 14px; background: var(--ive-bg-2); color: var(--ive-ink-3); display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.ive-photo img { width: 100%; height: 100%; object-fit: cover; }
.ive-photo svg { width: 28px; height: 28px; }
.ive-card--top .ive-photo { width: 100%; height: 170px; background: #2B2D33; color: #9FE3C1; }
.ive-photo small { font-size: 12px; color: #C9CCD3; }
.ive-photo__cap { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; }
.ive-kv { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.ive-card--top .ive-kv { gap: 7px; }
.ive-kv div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.ive-kv dt { color: var(--ive-ink-3); }
.ive-kv dd { margin: 0; font-weight: 700; color: var(--ive-ink); text-align: right; }
.ive-card--top .ive-kv dd { font-weight: 600; }
.ive-kv .is-ok { color: var(--ive-green-dark); }
.ive-kv .is-warn { color: var(--ive-late-text); }
.ive-kv .is-bad { color: var(--ive-bad-text); }
.ive-note { padding: 10px 12px; border-radius: 12px; background: var(--ive-bg-2); border: 1.5px solid var(--ive-line); font-size: 13px; color: var(--ive-ink-2); }
.ive-note b { color: var(--ive-ink); font-weight: 600; }
.ive-card__btns { display: flex; gap: 8px; }
.ive-card__empty { padding: 30px 6px; text-align: center; color: var(--ive-ink-3); font-size: 14px; }

/* Табель по салонам */
.ive-days { background: var(--ive-bg); border-radius: 20px; padding: 6px 16px; overflow-x: auto; }
.ive-days table { width: 100%; border-collapse: collapse; }
.ive-days th, .ive-days td { border-bottom: 1px solid var(--ive-line); padding: 8px 4px; vertical-align: top; text-align: left; }
.ive-days thead th { padding: 10px 4px; font-weight: 400; }
.ive-days thead th:first-child { width: 54px; font-size: 12px; font-weight: 600; color: var(--ive-ink-3); }
.ive-days thead b { display: block; font-size: 14px; font-weight: 700; color: var(--ive-ink); }
.ive-days thead small { display: block; font-size: 11px; color: var(--ive-ink-3); white-space: nowrap; }
.ive-days tbody th { width: 54px; font-weight: 400; }
.ive-days tbody th b { display: block; font-size: 16px; font-weight: 800; color: var(--ive-ink); }
.ive-days tbody th small { display: block; font-size: 11px; color: var(--ive-ink-3); }
.ive-days tbody tr.is-today { background: var(--ive-today-row); }
.ive-days tbody tr.is-today th b { color: var(--ive-pink); }
.ive-days tbody tr.is-future th b { color: var(--ive-ink-3); }
.ive-cell { display: flex; flex-direction: column; gap: 3px; padding: 6px 8px; border-radius: 10px; background: var(--ive-bg-2); min-height: 30px; min-width: 120px; }
.ive-cell.is-late { background: var(--ive-late-soft); }
.ive-cell.is-short { background: var(--ive-bad-soft); }
.ive-cell.is-closed { background: transparent; border: 1px dashed var(--ive-line); color: var(--ive-ink-3); font-size: 12px; }
.ive-cell.is-future { background: transparent; }
.ive-cell__none { font-size: 12px; font-weight: 700; color: var(--ive-bad-text); }
.ive-cell__short { font-size: 11px; font-weight: 600; color: var(--ive-bad-text); }
.ive-who { display: flex; align-items: center; gap: 6px; font-size: 12px; background: none; border: 0; padding: 0; text-align: left; color: var(--ive-ink-2); white-space: nowrap; }
.ive-who i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ive-who b { font-weight: 700; color: var(--ive-ink); }
.ive-who.ive-st--late b { color: var(--ive-late-text); }
.ive-who.is-picked span { color: var(--ive-pink); font-weight: 700; }
.ive-who.is-cancelled { text-decoration: line-through; opacity: .5; }
.ive-who sup { font-size: 10px; }

/* График */
.ive-week { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ive-week__title { font-size: 16px; font-weight: 700; color: var(--ive-ink); min-width: 140px; text-align: center; }
.ive-week__gap { flex: 1; }
.ive-chip { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--ive-line); background: var(--ive-bg); font-size: 13px; font-weight: 700; color: var(--ive-ink-2); }
.ive-chip.is-on { background: var(--ive-ink); border-color: var(--ive-ink); color: var(--ive-bg); }
.ive-chip--today { font-weight: 600; }
.ive-sched { background: var(--ive-bg); border-radius: 20px; padding: 14px 16px; overflow-x: auto; }
.ive-sched table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; }
.ive-sched thead th { background: var(--ive-bg-2); padding: 8px 4px; font-size: 12px; font-weight: 700; color: var(--ive-ink-3); text-align: center; }
.ive-sched thead th:first-child { text-align: left; padding-left: 10px; border-radius: 10px 0 0 10px; width: 200px; }
.ive-sched thead th:last-child { border-radius: 0 10px 10px 0; width: 60px; }
.ive-sched thead th.is-today { color: var(--ive-pink); }
.ive-sched tbody td, .ive-sched tbody th { padding: 6px 4px; border-bottom: 1px solid var(--ive-line); vertical-align: middle; }
.ive-sched tbody th { padding-left: 10px; text-align: left; font-weight: 400; }
.ive-person { display: flex; align-items: center; gap: 8px; }
.ive-ava { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ive-bg-2); color: var(--ive-ink-2); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ive-person b { display: block; font-size: 13px; font-weight: 600; color: var(--ive-ink); white-space: nowrap; }
.ive-person small { display: block; font-size: 11px; font-weight: 500; color: var(--ive-ink-3); }
.ive-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px; border-radius: 8px; background: var(--s-bg, var(--ive-pink-soft)); color: var(--s-fg, var(--ive-pink)); }
.ive-slot + .ive-slot { margin-top: 4px; }
.ive-slot b { font-size: 12px; font-weight: 700; }
.ive-slot small { font-size: 11px; font-weight: 500; }
.ive-slot .fact { font-size: 10px; font-weight: 600; color: var(--ive-green-dark); }
.ive-slot .miss { font-size: 10px; font-weight: 700; color: var(--ive-bad-text); }
.ive-slot__x { position: absolute; top: 2px; right: 4px; border: 0; background: none; padding: 0; font-size: 11px; line-height: 1; color: currentColor; opacity: 0; }
.ive-slot:hover .ive-slot__x { opacity: .6; }
.ive-slot__x:hover { opacity: 1 !important; }
.ive-off { display: flex; justify-content: center; padding: 7px 0; border-radius: 8px; background: var(--ive-bg-2); font-size: 12px; font-weight: 500; color: var(--ive-ink-3); }
.ive-sched td.hours { text-align: center; font-size: 13px; font-weight: 700; color: var(--ive-ink); }
.ive-sched tfoot td, .ive-sched tfoot th { padding: 8px 4px; background: var(--ive-bg-2); }
.ive-sched tfoot th { padding-left: 10px; text-align: left; font-size: 13px; font-weight: 700; color: var(--ive-ink); border-radius: 10px 0 0 10px; }
.ive-sched tfoot td:last-child { border-radius: 0 10px 10px 0; }
.ive-cover { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 8px; background: var(--ive-bg); font-size: 11px; font-weight: 700; color: var(--ive-ink-2); text-align: center; }
.ive-cover.is-bad { background: var(--ive-bad-soft); color: var(--ive-bad-text); }
.ive-cover .closed { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ive-ink-3); }
.ive-cover .closed button { border: 0; background: none; padding: 0; color: inherit; font-size: 11px; }
.ive-sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; background: var(--s-bg); box-shadow: inset 0 0 0 1px var(--s-fg); }

/* ---------- Общая «кожа» Filament по макетам (светлая тема) ---------- */
.fi-main { padding-top: 24px; }
.fi-header-heading { font-size: 28px !important; line-height: 1.15 !important; }
.fi-header-subheading { font-size: 15px !important; color: var(--ive-ink-2) !important; margin-top: 4px; }
/* Кнопки в шапке и тулбарах — белые с рамкой, радиус 12 */
.fi-btn { border-radius: 12px !important; font-weight: 600; }
html:not(.dark) .fi-header .fi-btn.fi-color-gray, html:not(.dark) .fi-header .fi-btn:not(.fi-color) { background: var(--ive-bg); box-shadow: inset 0 0 0 1px var(--ive-line); color: var(--ive-ink); }
.fi-header .fi-btn { min-height: 42px; padding-inline: 14px; }

/* Таблицы: белая панель r20 без тени, шапка серая плашкой, строки с линией */
html:not(.dark) .fi-ta-ctn { border-radius: 20px; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; background: var(--ive-bg); }
html:not(.dark) .fi-ta-header-cell { font-size: 12px !important; font-weight: 700 !important; color: var(--ive-ink-3) !important; background: var(--ive-bg-2); padding-block: 9px !important; }
html:not(.dark) .fi-ta-table > thead > tr > th:first-child { border-radius: 10px 0 0 10px; }
html:not(.dark) .fi-ta-table > thead > tr > th:last-child { border-radius: 0 10px 10px 0; }
html:not(.dark) .fi-ta-table > thead { border: 0 !important; }
html:not(.dark) .fi-ta-content-ctn { padding: 6px 14px 4px; }
html:not(.dark) .fi-ta-table { border-collapse: separate; border-spacing: 0; }
html:not(.dark) .fi-ta-table > tbody > tr > td { border-bottom: 1px solid var(--ive-line); }
html:not(.dark) .fi-ta-table > tbody { --tw-divide-y-reverse: 0; }
html:not(.dark) .fi-ta-table > tbody > tr { border: 0 !important; }
html:not(.dark) .fi-ta-table > tbody > tr:last-child > td { border-bottom: 0; }
.fi-ta-cell { font-size: 13px; }
html:not(.dark) .fi-ta-row:hover > td { background: var(--ive-bg-2); }
html:not(.dark) .fi-ta-header-toolbar, html:not(.dark) .fi-ta-header { border-color: var(--ive-line) !important; }
html:not(.dark) .fi-pagination { border-color: var(--ive-line) !important; }

/* Плашки статусов — «пилюли» как в макетах */
.fi-badge { border-radius: 999px !important; padding: 4px 10px !important; font-size: 12px !important; font-weight: 600 !important; --tw-ring-shadow: 0 0 #0000 !important; box-shadow: none !important; }
html:not(.dark) .fi-badge.fi-color-success { background: #E6F6EC !important; color: var(--ive-green-dark) !important; }
html:not(.dark) .fi-badge.fi-color-warning { background: var(--ive-late-soft) !important; color: var(--ive-warn-text) !important; }
html:not(.dark) .fi-badge.fi-color-danger { background: var(--ive-bad-soft) !important; color: var(--ive-bad-text) !important; }
html:not(.dark) .fi-badge.fi-color-info { background: var(--ive-blue-soft) !important; color: var(--ive-blue) !important; }
html:not(.dark) .fi-badge.fi-color-gray { background: var(--ive-bg-2) !important; color: var(--ive-ink-2) !important; }
html:not(.dark) .fi-badge.fi-color-primary { background: var(--ive-pink-soft) !important; color: var(--ive-pink) !important; }
.fi-badge .fi-icon { color: currentColor !important; }

/* Вкладки — подчёркивание розовым, как «Все · Новые · …» */
html:not(.dark) .fi-tabs:not(.fi-vertical) { background: transparent !important; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; border-radius: 0; border-bottom: 1px solid var(--ive-line); padding: 0 !important; gap: 24px; margin-inline: 0 !important; max-width: none !important; justify-content: flex-start; }
html:not(.dark) .fi-tabs:not(.fi-vertical) .fi-tabs-item { border-radius: 0; padding: 0 0 10px !important; margin-bottom: -1px; background: transparent !important; font-size: 15px; font-weight: 500; color: var(--ive-ink-2); }
html:not(.dark) .fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active { color: var(--ive-ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--ive-pink); }
html:not(.dark) .fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active .fi-tabs-item-label, html:not(.dark) .fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active .fi-icon { color: var(--ive-ink) !important; }
html:not(.dark) .fi-tabs .fi-tabs-item .fi-badge { padding: 1px 7px !important; font-size: 11px !important; font-weight: 700 !important; background: var(--ive-bg) !important; color: var(--ive-ink-2) !important; }

/* Секции и карточки форм — белые r20 без тени */
html:not(.dark) .fi-section:not(.fi-section-not-contained) { border-radius: 20px; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; }
.fi-section-header-heading { font-size: 18px !important; font-weight: 700 !important; }
html:not(.dark) .fi-section-header-description { color: var(--ive-ink-3); }
html:not(.dark) .fi-wi-stats-overview-stat { border-radius: 20px; box-shadow: none !important; --tw-ring-shadow: 0 0 #0000 !important; }

/* Поля ввода — серый фон r12 */
html:not(.dark) .fi-input-wrp { border-radius: 12px; background: var(--ive-bg-2); box-shadow: none !important; --tw-ring-color: var(--ive-line) !important; }
html:not(.dark) .fi-input-wrp:focus-within { --tw-ring-color: var(--ive-pink) !important; background: var(--ive-bg); }
.fi-fo-field-label-content { font-size: 13px; font-weight: 600; }

/* Меню — как «Меню сотрудника»: 15/500, иконка 19, активный — розовый */
html:not(.dark) .fi-sidebar { border-right: 1px solid var(--ive-line); }
.fi-sidebar-item-btn { padding: 10px 12px !important; gap: 12px !important; }
.fi-sidebar-item-label { font-size: 15px; font-weight: 500; }
html:not(.dark) .fi-sidebar-item-label { color: var(--ive-ink-2); }
html:not(.dark) .fi-sidebar-item-btn > .fi-icon { color: var(--ive-ink-2); }
.fi-sidebar-item-badge-ctn .fi-badge { padding: 2px 8px !important; font-weight: 700 !important; }
html:not(.dark) .fi-sidebar-item-badge-ctn .fi-badge.fi-color-danger, html:not(.dark) .fi-sidebar-item-badge-ctn .fi-badge.fi-color-primary { background: var(--ive-pink) !important; color: #fff !important; }
.fi-sidebar-group-btn { padding-top: 14px; }

/* Модалки и выпадашки */
.fi-modal-window { border-radius: 20px !important; }
.fi-dropdown-panel { border-radius: 14px !important; }

/* Вкладки раздела и карточка сотрудника внизу меню */
.ive-section-tabs { margin-bottom: 4px; }
.ive-tabs__count { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ive-bg); font-size: 11px; font-weight: 700; color: var(--ive-ink-2); vertical-align: 1px; }
.ive-tabs a.is-on .ive-tabs__count { background: var(--ive-pink); color: #fff; }
.ive-me { display: flex; align-items: center; gap: 10px; margin: 8px 12px 14px; padding: 12px; border-radius: 14px; background: var(--ive-bg-2); }
.ive-me__ava { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ive-ink); color: var(--ive-bg); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ive-me__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ive-me__text b { font-size: 14px; font-weight: 600; color: var(--ive-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ive-me__text small { font-size: 12px; color: var(--ive-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ive-me form { display: contents; }
.ive-me__out { border: 0; background: none; padding: 4px; color: var(--ive-ink-3); cursor: pointer; }
.ive-me__out:hover { color: var(--ive-pink); }
.fi-sidebar:not(.fi-sidebar-open) .ive-me__text, .fi-sidebar:not(.fi-sidebar-open) .ive-me form { display: none; }
/* Вкладки списков Filament (Все · Ждут решения …) под вкладками раздела — сегментами */
html:not(.dark) .ive-section-tabs ~ * .fi-tabs:not(.fi-vertical), html:not(.dark) .fi-page-content > .ive-section-tabs ~ .fi-tabs { border-bottom: 0; gap: 4px; padding: 4px !important; background: var(--ive-bg) !important; border-radius: 12px; width: fit-content; }
html:not(.dark) .ive-section-tabs ~ * .fi-tabs:not(.fi-vertical) .fi-tabs-item { padding: 8px 14px !important; margin: 0; border-radius: 9px; font-size: 14px; font-weight: 600; }
html:not(.dark) .ive-section-tabs ~ * .fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active { background: var(--ive-ink) !important; box-shadow: none; }
html:not(.dark) .ive-section-tabs ~ * .fi-tabs:not(.fi-vertical) .fi-tabs-item.fi-active .fi-tabs-item-label { color: #fff !important; }

/* Меню сворачивается до иконок (макет DYbic): заметная кнопка у логотипа, разделители групп вместо подписей */
@media (min-width: 1024px) {
  .fi-topbar-close-collapse-sidebar-btn, .fi-topbar-open-collapse-sidebar-btn { border: 1px solid var(--ive-line) !important; border-radius: 10px !important; }
  .fi-topbar-close-collapse-sidebar-btn:hover, .fi-topbar-open-collapse-sidebar-btn:hover { border-color: var(--ive-pink) !important; }
  .fi-main-sidebar:not(.fi-sidebar-open) .fi-sidebar-group-label { display: none; }
  .fi-main-sidebar:not(.fi-sidebar-open) .fi-sidebar-group + .fi-sidebar-group { border-top: 1px solid var(--ive-line); margin-top: 6px; padding-top: 6px; }
  .fi-main-sidebar:not(.fi-sidebar-open) .fi-sidebar-group-btn { display: none; }
}
