
/* Аитерус components — values copied from the web app (MUI + Tailwind build). */
body { margin: 0; background: var(--background); color: var(--black-text); font-family: var(--font-sans, Inter, Arial, sans-serif); font-size: 14px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ai-icon { display: inline-block; flex-shrink: 0; }
.ai-flip { transform: scaleX(-1); }
.ai-h2 { margin: 0; font-family: var(--font-display, "Aiterus Science Gothic", "Science Gothic", Arial, sans-serif); font-weight: 350; font-size: 24px; line-height: 1.3; letter-spacing: -0.04em; color: var(--black-text); }

/* Count badge */
.ai-count { font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 48px; font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: 0; }
.ai-count--primary { background: var(--primary); color: var(--white-base); }
.ai-count--inverse { background: var(--white-base); color: var(--primary); }
.ai-count--muted { background: var(--grey-dark); color: var(--white-base); }
.ai-count--danger { background: var(--red-base); color: var(--white-base); height: 20px; min-width: 20px; border-radius: 6px; }

/* Button — the house shape: 6px on top-left and bottom-right only */
.ai-btn { height: 40px; padding: 10px 12px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 6px 0; font: 500 14px/1.4 var(--font-sans, Inter, Arial, sans-serif); font-variant-numeric: tabular-nums; letter-spacing: 0; cursor: pointer; transition: all .2s; white-space: nowrap; }
.ai-btn--full { width: 100%; }
.ai-btn--icon { width: 40px; padding: 8px; }
.ai-btn--primary { background: var(--primary); color: var(--white-base); }
.ai-btn--primary:hover { opacity: .8; }
.ai-btn--outline { background: var(--background); color: var(--primary-text); border: 1.5px solid var(--outline-primary); }
.ai-btn--outline:hover { background: var(--menu-selected); border-color: var(--primary-text); }
.ai-btn--text { background: transparent; color: var(--primary-text); padding: 0; height: auto; min-height: 24px; border-radius: 0; align-self: center; }
.ai-btn--text:hover { background: transparent; opacity: .6; }
.ai-btn--danger { background: var(--red-base); color: var(--white-base); }
.ai-btn--danger:hover { opacity: .8; }
.ai-btn:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }
.ai-btn:disabled { cursor: not-allowed; opacity: 1; }
.ai-btn--primary:disabled, .ai-btn--danger:disabled { background: var(--disabled-fill); color: var(--disabled-text); }
.ai-btn--outline:disabled { border-color: var(--filter-border); color: var(--disabled-text); background: var(--background); }
.ai-btn--text:disabled { color: var(--grey-dark); background: transparent; }

.ai-iconbtn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--primary-text); cursor: pointer; transition: background-color .2s; }
.ai-iconbtn--soft { background: var(--primary-10); }
.ai-iconbtn:hover { background: var(--menu-selected); }
.ai-iconbtn:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }

/* Text field / select — MUI outlined, small */
.ai-field { display: inline-flex; flex-direction: column; min-width: 200px; max-width: 100%; box-sizing: border-box; font-family: var(--font-sans, Inter, Arial, sans-serif); }
.ai-field__box { position: relative; display: flex; align-items: center; height: 40px; box-sizing: border-box; padding: 0 8px 0 12px; border: 1px solid var(--grey-border-soft); border-radius: 4px; background: var(--background); transition: border-color .2s; }
.ai-field__box:hover { border-color: var(--grey-border); }
.ai-field__label { position: absolute; left: 8px; top: -8px; padding: 0 4px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--background); font-size: 10.5px; font-weight: 500; line-height: 15px; color: var(--grey-text); }
.ai-field__req { color: var(--red); }
.ai-field__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0; background: transparent; font: 400 14px/20px var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; color: var(--black-text); text-overflow: ellipsis; cursor: inherit; }
.ai-field__input::placeholder { color: var(--grey-text); opacity: 1; }
.ai-field__end { color: var(--primary-text); margin-left: 8px; transition: transform .2s; }
.ai-field__end--open { transform: rotate(180deg); }
.ai-field--focused .ai-field__box { border-color: var(--primary-text); }
.ai-field--error .ai-field__box { border-color: var(--danger-text); }
.ai-field--error .ai-field__label, .ai-field--error .ai-field__input, .ai-field--error .ai-field__end { color: var(--danger-text); }
.ai-field__helper { margin: 4px 0 0; font-size: 12px; line-height: 1.2; color: var(--grey-text); }
.ai-field--error .ai-field__helper { color: var(--danger-text); }
.ai-field--disabled .ai-field__box { background: var(--filter-disabled-background); border-color: var(--filter-border); cursor: not-allowed; }
.ai-field--disabled .ai-field__label { color: var(--disabled-text); }
.ai-field--disabled .ai-field__label { background: linear-gradient(var(--background) 50%, var(--filter-disabled-background) 50%); }
.ai-field--disabled .ai-field__input { color: var(--disabled-text); }
.ai-field--disabled .ai-field__end { color: var(--grey-border-soft); }
.ai-select { position: relative; display: inline-block; max-width: 100%; cursor: pointer; }
.ai-select .ai-field { min-width: 0; }
.ai-select .ai-field { width: 100%; }
.ai-select .ai-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 5; }

/* Menu */
.ai-menu { background: var(--background-2); border-radius: 6px; box-shadow: var(--shadow-card); padding: 4px 0; min-width: 200px; }
.ai-menu__item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--black-text); cursor: pointer; }
.ai-menu__item .ai-check { margin-top: 0; }
.ai-menu__item--checked { background: var(--menu-selected); }
.ai-menu__item:hover, .ai-menu__item--hover { background: var(--background-light-2); }
.ai-menu__label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Checkbox */
.ai-check { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; color: var(--primary-text); flex-shrink: 0; }
.ai-check__off { width: 15px; height: 15px; box-sizing: border-box; border: 1px solid var(--grey-border-soft); background: var(--background); border-radius: 2px; }
.ai-check--disabled { color: var(--grey-border); }
.ai-check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--black-text); cursor: pointer; }
.ai-check-row--disabled { color: var(--disabled-text); cursor: not-allowed; }

/* Switch */
.ai-switch-row { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--black-text); cursor: pointer; }
.ai-switch-row--disabled { color: var(--disabled-text); cursor: not-allowed; }
.ai-switch-row--disabled .ai-switch { opacity: .5; }
.ai-switch { position: relative; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 12px; background: var(--grey-border); cursor: pointer; transition: background-color .2s; flex-shrink: 0; }
.ai-switch--on { background: var(--switch-track); }
.ai-switch__thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--white-base); transition: transform .2s; }
.ai-switch--on .ai-switch__thumb { transform: translateX(16px); }
.ai-switch:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }

/* Tabs — folder tabs on a hairline */
.ai-tabs-wrap { position: relative; min-width: 0; }
.ai-tabs { display: flex; gap: 8px; box-shadow: inset 0 -1px 0 var(--filter-border); /* линия под табами рисуется тенью внутри ряда: выбранный таб закрывает ее своим нижним краем, даже при overflow */ overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.ai-tabs::-webkit-scrollbar { display: none; }
/* Edge shadow — the same narrow translucent hint as tables: shown only on the side with hidden content */
.ai-edge { position: absolute; top: 0; bottom: 0; width: 12px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .2s; }
.ai-edge--on { opacity: 1; }
.ai-edge--l { left: 0; background: linear-gradient(to right, var(--table-scroll-edge, rgba(38, 38, 38, .1)), transparent); }
.ai-edge--r { right: 0; background: linear-gradient(to left, var(--table-scroll-edge, rgba(38, 38, 38, .1)), transparent); }
.ai-tab { flex-shrink: 0; white-space: nowrap; position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 90px; min-height: 40px; padding: 8px 12px; box-sizing: border-box; border: 1px solid var(--filter-border); border-radius: 6px 6px 0 0; background: var(--background-light); color: var(--black-text); font: 500 14px/1.25 var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; cursor: pointer; transition: background-color .2s; }
.ai-tab:hover, .ai-tab--hover { background: var(--menu-selected); }
.ai-tab--selected { background: var(--background); border-bottom-color: var(--background); }
.ai-tab--selected:hover { background: var(--background); }

/* Status chip */
.ai-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; border-radius: 6px; font: 500 14px/20px var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; white-space: nowrap; box-sizing: border-box; }
.ai-chip--icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
.ai-chip--icon .ai-icon { width: 18px; height: 18px; }
.ai-chip--red { background: var(--status-red-bg); color: var(--status-red-text); }
.ai-chip--violet { background: var(--status-violet-bg); color: var(--status-violet-text); }
.ai-chip--blue { background: var(--status-blue-bg); color: var(--status-blue-text); }
.ai-chip--yellow { background: var(--status-yellow-bg); color: var(--status-yellow-text); }
.ai-chip--green { background: var(--status-green-bg); color: var(--status-green-text); }
.ai-chip--grey { background: var(--status-grey-bg); color: var(--status-grey-text); }
.ai-chip__ai { font-size: 12px; font-weight: 700; letter-spacing: 0; }

/* Toast */
.ai-toast { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 8px; width: 300px; min-height: 56px; box-sizing: border-box; padding: 12px 12px 14px; border-radius: 6px; background: var(--toast-bg); color: var(--white-base); font: 400 14px/1.4 var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; --ai-icon-cut: var(--toast-bg); }
.ai-toast--success { --ai-tone: var(--toast-success); }
.ai-toast--error { --ai-tone: var(--toast-error); }
.ai-toast--warning { --ai-tone: var(--toast-warning); }
.ai-toast--info { --ai-tone: var(--toast-info); }
.ai-toast__icon { display: flex; flex-shrink: 0; width: 20px; height: 20px; align-items: center; color: var(--ai-tone); }
.ai-toast__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ai-toast__action { flex-shrink: 0; border: 0; background: none; padding: 0; color: var(--white-base); font: 600 14px/1.4 var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; cursor: pointer; }
.ai-toast__action:hover { color: var(--ai-tone); }
.ai-toast__close { flex-shrink: 0; border: 0; background: none; padding: 1px 0 0; color: var(--white-base); opacity: .7; cursor: pointer; display: flex; }
.ai-toast__close:hover { opacity: 1; }
.ai-toast__progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ai-tone); }

/* Tooltip */
.ai-tooltip.ai-sidebar__tip { position: fixed; z-index: 1000; transform: translateY(-50%); pointer-events: none; padding: 8px 12px; border-radius: 8px; background: var(--tooltip-background); font-size: 14px; line-height: 20px; white-space: nowrap; box-shadow: 0 4px 16px rgba(38, 38, 38, 0.18); }
.ai-tooltip--right::before { content: ""; position: absolute; left: -6px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left: 0; border-right-color: var(--tooltip-background); }
.ai-tooltip { position: relative; display: inline-block; max-width: 220px; padding: 4px 8px; border-radius: 4px; background: var(--tooltip-background); color: var(--white-base); font: 500 12px/1.2 var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; }

/* Calendar */
.ai-cal { display: inline-block; width: 296px; padding: 16px; box-sizing: border-box; border: 0; border-radius: 6px; background: var(--background-2); box-shadow: var(--shadow-card); color: var(--black-text); }
.ai-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ai-cal__nav { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--outline-primary); border-radius: 4px; background: var(--background); color: var(--primary-text); cursor: pointer; padding: 0; }
.ai-cal__title { font-size: 14px; font-weight: 500; }
.ai-cal__grid { display: grid; grid-template-columns: repeat(7, 38px); row-gap: 2px; }
.ai-cal__wd { height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--grey-text); }
.ai-cal__day { position: relative; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 400; border-radius: 4px; cursor: pointer; box-sizing: border-box; }
.ai-cal__day:hover { background: var(--menu-selected); }
.ai-cal__day--wk { color: var(--grey-text); }
.ai-cal__day--out { color: var(--grey-border); font-weight: 400; }
.ai-cal__day--range { background: var(--background-light); border-radius: 0; }
.ai-cal__day--today { border: 1px solid var(--grey-dark); }
.ai-cal__day--mark::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 10px; height: 2px; margin-left: -5px; background: var(--primary); border-radius: 1px; }
.ai-cal__day--sel { background: var(--primary); color: var(--white-base); border-radius: 4px; }
.ai-cal__foot { display: flex; gap: 12px; margin-top: 16px; }

/* Sidebar */
.ai-sidebar { width: 212px; height: 100%; min-height: 360px; box-sizing: border-box; display: flex; flex-direction: column; padding: 11px 0 12px; background: var(--black-base); color: var(--white-base); font-family: var(--font-sans, Inter, Arial, sans-serif); transition: width .3s; }
.ai-sidebar--collapsed { width: 52px; }
.ai-sidebar__logo { display: flex; align-items: center; height: 48px; margin-bottom: 4px; padding: 0 12px 0 16px; box-sizing: border-box; } /* полоса 48px, как первая строка шапки */
.ai-sidebar--collapsed .ai-sidebar__logo { padding: 0 14px; }
.ai-sidebar { flex-shrink: 0; overflow: hidden; }
/* Dark theme: the menu and the page share black-base, so a hairline separates them */
[data-theme="dark"] .ai-sidebar { box-shadow: inset -1px 0 0 var(--grey-black); }
.ai-sidebar__nav { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
.ai-sidebar__nav::-webkit-scrollbar { display: none; width: 0; height: 0; }
.ai-sidebar__nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-nav { width: 204px; min-height: 40px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; padding: 0 12px 0 0; border: 0; border-radius: 0 6px 6px 0; background: var(--graphite); color: var(--white-base); text-align: left; cursor: pointer; transition: background-color .2s; font: 500 14px/20px var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; box-sizing: border-box; }
.ai-sidebar--collapsed .ai-nav { width: 44px; grid-template-columns: 44px; padding: 0; }
.ai-nav:hover, .ai-nav--active { background: var(--primary); }
.ai-nav__icon { display: flex; justify-content: flex-end; padding: 8px 8px 8px 12px; color: var(--white-base); }
.ai-nav__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-nav__chev { color: var(--sea-light); }
.ai-nav--active .ai-nav__chev, .ai-nav:hover .ai-nav__chev { color: var(--white-base); }
.ai-nav__sub { list-style: none; margin: 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ai-nav__subitem { display: block; width: 204px; padding: 0 12px 0 48px; white-space: normal; overflow-wrap: break-word; border: 0; background: none; color: var(--white-base); text-align: left; font: 500 14px/20px var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; cursor: pointer; box-sizing: border-box; }
.ai-nav__subitem:hover, .ai-nav__subitem--active { color: var(--sea-light); }
.ai-sidebar__collapse { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 16px; border: 0; background: none; color: var(--white-base); font: 500 14px/20px var(--font-sans, Inter, Arial, sans-serif); cursor: pointer; }

/* Page header */
.ai-header { --ai-header-row: 48px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 11px 22px; background: var(--background); font-family: var(--font-sans, Inter, Arial, sans-serif); }
.ai-header__title { display: flex; flex: 1; align-items: flex-start; gap: 12px; min-width: 0; }
.ai-header__title .ai-h2 { min-width: 0; margin: 0; padding-top: calc((var(--ai-header-row) - 32px) / 2); line-height: 32px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ai-header__back { flex-shrink: 0; width: 32px; height: 32px; padding: 0; margin-top: calc((var(--ai-header-row) - 32px) / 2); }
.ai-header__actions { display: flex; flex-shrink: 0; align-items: center; gap: 12px; height: var(--ai-header-row); }
.ai-header__sep { width: 1px; height: 32px; background: var(--grey-medium); }
.ai-user { display: flex; flex-direction: column; gap: 4px; max-width: 200px; min-width: 0; padding: 6px 8px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; font-family: inherit; letter-spacing: 0; }
.ai-user:hover { opacity: .6; }
.ai-user__name { font-size: 14px; line-height: 1.15; font-weight: 600; color: var(--primary-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-user__role { font-size: 12px; line-height: 1.15; font-weight: 600; color: var(--grey-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* DataTable — zebra rows, no rules, rounded row ends */
.ai-table-wrap { overflow: auto; background: var(--background-table); }
.ai-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; }
.ai-table th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; background: var(--background); color: var(--grey-text); font-size: 14px; font-weight: 400; line-height: 24px; text-align: left; white-space: nowrap; }
.ai-table th:first-child, .ai-table td:first-child { padding-left: 12px; }
.ai-th { display: inline-flex; align-items: center; gap: 6px; }
.ai-th__sort { color: var(--grey-text); font-size: 12px; }
.ai-table td { white-space: nowrap; padding: 10px 8px; color: var(--black-text); font-size: 14px; font-weight: 400; line-height: 20px; vertical-align: middle; }
/* Многострочные ячейки (колонка с wrap): текст переносится, вся строка выравнивается по верхнему краю */
.ai-table .ai-td--wrap { white-space: normal; }
.ai-table--top td { vertical-align: top; }
.ai-table td .ai-iconbtn { width: 28px; height: 28px; margin: -4px 0; vertical-align: middle; }
.ai-table td > svg { display: inline-block; vertical-align: middle; }
.ai-table tbody tr:nth-child(odd) { background: var(--background-odd-row); }
.ai-table tbody tr:nth-child(even) { background: var(--background-even-row); }
.ai-table--plain tbody tr:nth-child(odd) { background: var(--background-even-row); }
.ai-table tbody tr:hover, .ai-table tbody tr.ai-row--hover { background: var(--background-table-hover); }
.ai-table tbody tr.ai-row--selected { background: var(--primary-10); }
.ai-table td:first-child { border-radius: 6px 0 0 6px; }
.ai-table td:last-child { border-radius: 0 6px 6px 0; }
.ai-table a, .ai-link { color: var(--primary-text); font-weight: 400; text-decoration: none; cursor: pointer; }
/* «Перейти →» и другие ссылки-действия вне таблиц — текстовая кнопка, Inter 500 */
.ai-link { font-weight: 500; }
.ai-table .ai-link { font-weight: 400; }
.ai-cell-muted { color: var(--grey-text); }
.ai-cell-danger { color: var(--danger-text); }

/* GroupTable — shifts › flats › points */
.ai-gt { font-family: var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; color: var(--black-text); }
.ai-gt__head { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; background: var(--background-light); border-radius: 6px; font-size: 14px; cursor: pointer; }
.ai-gt__line { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-gt__title { font-weight: 500; color: var(--black-text); }
.ai-gt__meta { color: var(--grey-text); font-weight: 400; }
.ai-gt__badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; color: var(--grey-text); }
.ai-gt__chev { color: var(--primary-text); }
.ai-gt__sub { margin-left: 32px; }
.ai-gt__subhead { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-bottom: 1px solid var(--filter-border); cursor: pointer; font-size: 14px; }
.ai-gt__sub:has(table) .ai-gt__subhead { border-bottom: 0; }
.ai-gt__link { color: var(--primary-text); font-weight: 400; }
.ai-gt__count { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; font-weight: 400; }
.ai-gt__dot { width: 6px; height: 6px; border-radius: 50%; }
.ai-gt__dot--red { background: var(--checkerboard-defect-red); }
.ai-gt__dot--green { background: var(--green-base); }
.ai-gt__scroll { width: calc(100% + 32px); margin-left: -32px; overflow-x: auto; }
.ai-gt__table { width: 100%; min-width: max-content; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.ai-gt__table th { padding: 12px 12px 12px 64px; text-align: left; font-weight: 400; color: var(--grey-text); border-top: 1px solid var(--filter-border); border-bottom: 1px solid var(--filter-border); }
.ai-gt__table th + th, .ai-gt__table td + td { padding-left: 12px; }
.ai-gt__table td { padding: 10px 12px 10px 64px; font-weight: 400; border-bottom: 1px solid var(--filter-border); }
.ai-gt__table tbody tr:hover, .ai-gt__table tr.ai-row--hover { background: var(--background-table-hover); }
.ai-cell { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; vertical-align: middle; }
.ai-gt__table .ai-check { vertical-align: middle; margin-right: 10px; }

/* Pagination */
.ai-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--font-sans, Inter, Arial, sans-serif); }
.ai-pager__pages { display: flex; gap: 8px; }
.ai-pager__item { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--grey-border-soft); border-radius: 6px; background: var(--background); color: var(--primary-text); font: 500 12px/1.2 var(--font-sans, Inter, Arial, sans-serif); cursor: pointer; }
.ai-pager__item:hover { background: var(--menu-selected); }
.ai-pager__item--sel, .ai-pager__item--sel:hover { background: var(--primary); border-color: var(--primary); color: var(--white-base); }
.ai-pager__item:disabled { color: var(--grey-border); cursor: default; background: var(--background); }
.ai-pager__rows { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; color: var(--grey-text); }
.ai-pager__select { display: flex; align-items: center; justify-content: space-between; width: 80px; height: 32px; padding: 0 4px 0 12px; box-sizing: border-box; border: 1px solid var(--grey-border-soft); border-radius: 4px; color: var(--black-text); }
.ai-pager__select .ai-icon { color: var(--primary-text); }

/* Settings row */
.ai-setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-radius: 6px; background: var(--background-light); font-family: var(--font-sans, Inter, Arial, sans-serif); letter-spacing: 0; }
.ai-setting__title { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--black-text); }
.ai-setting__desc { font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--black-text); }

/* Dark theme: the light hover tint of outline buttons would glare on black-base */



/* Airy scrollbars — thin translucent thumb on a transparent track, in its own gutter (never over content) */
.ai-table-wrap, .ai-gt__scroll, .ai-menu, .ai-scroll { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
.ai-table-wrap::-webkit-scrollbar, .ai-gt__scroll::-webkit-scrollbar, .ai-menu::-webkit-scrollbar, .ai-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.ai-table-wrap::-webkit-scrollbar-track, .ai-gt__scroll::-webkit-scrollbar-track, .ai-menu::-webkit-scrollbar-track, .ai-scroll::-webkit-scrollbar-track { background: transparent; }
.ai-table-wrap::-webkit-scrollbar-thumb, .ai-gt__scroll::-webkit-scrollbar-thumb, .ai-menu::-webkit-scrollbar-thumb, .ai-scroll::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 2px solid transparent; border-radius: 8px; background-clip: content-box; }
.ai-table-wrap::-webkit-scrollbar-thumb:hover, .ai-gt__scroll::-webkit-scrollbar-thumb:hover, .ai-menu::-webkit-scrollbar-thumb:hover, .ai-scroll::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
.ai-table-wrap::-webkit-scrollbar-corner, .ai-gt__scroll::-webkit-scrollbar-corner, .ai-menu::-webkit-scrollbar-corner, .ai-scroll::-webkit-scrollbar-corner { background: transparent; }

/* Dark theme: lighter weights — light text on dark reads heavier, so smooth in greyscale and step 600/700 down */
[data-theme="dark"] .ai-btn, [data-theme="dark"] .ai-tab, [data-theme="dark"] .ai-toast__action, [data-theme="dark"] .ai-gt__title, [data-theme="dark"] .ai-user__name, [data-theme="dark"] .ai-user__role, [data-theme="dark"] .ai-setting__title { font-weight: 500; }
[data-theme="dark"] .ai-chip__ai { font-weight: 600; }
