/* AiPax component styles — source of truth: the admin panel (ui_kits/admin, AdminPrimitives.jsx). Values mirror its primitives 1:1. */
.ax-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-4); }
.ax-col { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }

/* Button — admin GradButton / OutlineButton / GhostButton / LinkButton */
.ax-btn { cursor: pointer; padding: 12px 22px; font: 600 16px/20px var(--font-sans); border-radius: var(--radius-control); text-align: center; display: inline-flex; align-items: center; gap: 10px; justify-content: center; transition: background-color .15s, color .15s, box-shadow .15s, filter .15s; border: 0; text-decoration: none; background: var(--adm-grad); color: #fff; box-shadow: 0 4px 12px rgba(47,128,237,.25); white-space: nowrap; }
.ax-btn:hover { color: #fff; filter: brightness(.95); box-shadow: 0 6px 16px rgba(47,128,237,.3); }
.ax-btn svg, .ax-btn .ti { width: 20px; height: 20px; font-size: 20px; line-height: 1; }
.ax-btn--secondary { background: var(--adm-link); color: #fff; box-shadow: 0 4px 12px rgba(47,128,237,.25); }
.ax-btn--secondary:hover { background: #2a73d6; color: #fff; }
.ax-btn--outline { background: #fff; border: 1px solid var(--adm-link); color: var(--adm-text); box-shadow: none; }
.ax-btn--outline:hover { background: #f5f9ff; color: var(--adm-text); filter: none; box-shadow: none; }
.ax-btn--outline.ax-btn--secondary { border-color: var(--adm-border); }
.ax-btn--light { background: #fff; border: 1px solid var(--adm-border); color: var(--adm-text); font-weight: 500; font-size: 14px; padding: 8px 14px; gap: 8px; box-shadow: none; }
.ax-btn--light:hover { background: #f8fafc; color: var(--adm-text); filter: none; box-shadow: none; }
.ax-btn--light svg, .ax-btn--light .ti { width: 16px; height: 16px; font-size: 16px; }
.ax-btn--link { background: transparent; border: 0; color: var(--adm-link); padding: 8px 10px; font-size: 15px; gap: 8px; box-shadow: none; }
.ax-btn--link:hover { background: transparent; color: #2a73d6; filter: none; box-shadow: none; text-decoration: underline; }
.ax-btn--small { padding: 8px 16px; font-size: 14px; line-height: 20px; }
.ax-btn--small svg, .ax-btn--small .ti { width: 16px; height: 16px; font-size: 16px; }
.ax-btn--icon { width: 32px; height: 32px; padding: 0; border: 1px solid var(--adm-border); border-radius: var(--radius-lg); background: #fff; color: var(--adm-muted); box-shadow: none; }
.ax-btn--icon:hover { background: #f8fafc; color: var(--adm-text); filter: none; box-shadow: none; }
.ax-btn--icon svg, .ax-btn--icon .ti { width: 16px; height: 16px; font-size: 16px; }
.ax-btn:disabled, .ax-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.ax-btn:focus-visible { outline: 2px solid var(--adm-link); outline-offset: 2px; }

/* Card — admin Panel */
.ax-card { padding: 20px; border-radius: var(--adm-card-radius); background: var(--adm-card); color: var(--adm-text); width: 100%; box-sizing: border-box; box-shadow: var(--adm-card-shadow); }
.ax-card--flush { padding: 0; overflow: hidden; }

/* Tabs — admin UnderlineTabs (default) / BlueTabs (.ax-tabs--blue) */
.ax-tabs { display: flex; align-items: flex-end; gap: 24px; border-bottom: 1px solid var(--adm-border); overflow-x: auto; }
.ax-tab { display: flex; align-items: center; padding: 10px 0 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--adm-text); font: 400 15px/20px var(--font-sans); white-space: nowrap; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s; }
.ax-tab:hover { color: var(--adm-tab-active); border-bottom-color: var(--adm-border); }
.ax-tab[aria-current="page"] { font-weight: 600; color: var(--adm-tab-active); border-bottom-color: var(--adm-tab-active); }
.ax-tabs--blue { gap: 22px; border-bottom: 0; }
.ax-tabs--blue .ax-tab { padding: 8px 0 10px; font-weight: 500; margin-bottom: 0; }
.ax-tabs--blue .ax-tab:hover { color: var(--adm-link); border-bottom-color: transparent; }
.ax-tabs--blue .ax-tab[aria-current="page"] { color: var(--adm-link); border-bottom-color: var(--adm-link); font-weight: 500; }
/* Segmented — admin Segmented */
.ax-segmented { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--radius-control); background: #eef2f6; }
.ax-segmented button { padding: 8px 16px; border: 0; border-radius: var(--radius-lg); background: transparent; color: var(--adm-text); font: 500 14px/20px var(--font-sans); cursor: pointer; }
.ax-segmented button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }

/* Alert */
.ax-alert { padding: 16px 20px; font: 400 15px/22px var(--font-sans); border-radius: var(--radius-control); }
.ax-alert--error { color: var(--alert-error-fg); background: var(--alert-error-bg); }
.ax-alert--success { color: var(--alert-success-fg); background: var(--alert-success-bg); }
.ax-alert ul { margin: 0; padding-left: 18px; }
.ax-error { color: var(--adm-stat-red); font-size: 14px; margin: 4px 0 0; }
.ax-error::before { content: "⚠ "; }

/* Badge / Pill — admin Pill: uppercase 11px, 1px border, outlined by default, --filled tint */
.ax-badge { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); border: 1px solid currentColor; background: #fff; font: 700 11px/16px var(--font-sans); letter-spacing: .04em; text-transform: uppercase; padding: 3px 12px; white-space: nowrap; }
.ax-badge--realization { color: var(--adm-stat-blue); }
.ax-badge--month { color: var(--adm-stat-green); }
.ax-badge--whole { color: var(--adm-stat-orange); }
.ax-badge--none { color: var(--adm-muted); }
.ax-badge--red { color: var(--adm-stat-red); }
.ax-badge--purple { color: #7c3aed; }
.ax-badge--filled { border-color: transparent; }
.ax-badge--filled.ax-badge--realization { background: var(--adm-tint-blue); }
.ax-badge--filled.ax-badge--month { background: var(--adm-tint-green); }
.ax-badge--filled.ax-badge--whole { background: var(--adm-tint-orange); }
.ax-badge--filled.ax-badge--none { background: #f1f5f9; }
.ax-badge--filled.ax-badge--red { background: var(--adm-tint-red); }
.ax-badge--filled.ax-badge--purple { background: var(--adm-tint-purple); }

/* SectionHeading — admin page/section titles */
.ax-heading { display: flex; flex-direction: column; gap: 4px; }
.ax-heading--center { text-align: center; align-items: center; }
.ax-heading small { color: var(--adm-muted); text-transform: uppercase; font: 600 11px/16px var(--font-sans); letter-spacing: .04em; }
.ax-heading h2 { margin: 0; color: var(--adm-text); font: 600 24px/30px var(--font-sans); }
.ax-heading--hero h2 { font: 700 30px/36px var(--font-sans); }

/* FilterPill + bar — admin FilterChip / SortChip */
.ax-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ax-filter-bar__title { display: inline-flex; align-items: center; gap: 6px; font: 500 15px/20px var(--font-sans); color: var(--adm-text); }
.ax-pill { display: inline-flex; max-width: 260px; align-items: center; gap: 10px; border-radius: var(--radius-control); border: 1px solid var(--adm-border); background: #fff; padding: 10px 16px; font: 400 15px/20px var(--font-sans); color: var(--adm-text); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ax-pill:hover { border-color: #cbd5e1; }
.ax-pill--active { border-color: var(--pill-active-border); background: var(--pill-active-bg); color: var(--adm-link); }
.ax-pill svg { width: 14px; height: 14px; color: var(--adm-muted); flex: none; }
.ax-count { display: inline-flex; height: 18px; min-width: 18px; box-sizing: border-box; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--adm-link); padding: 0 6px; font: 600 11px/18px var(--font-sans); color: #fff; }
.ax-count-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--radius-full); font: 400 14px/18px var(--font-sans); color: var(--adm-muted); }
.ax-count-chip b { font: 700 15px var(--font-sans); }

/* ---------- Forms — admin Field (44px, 10px radius, 15px type) ---------- */
.ax-field { display: flex; flex-direction: column; min-width: 0; gap: 8px; }
.ax-label { font: 400 15px/20px var(--font-sans); color: var(--adm-text); }
.ax-label--bold { font-weight: 600; }
.ax-req { color: var(--adm-stat-red); margin-left: 4px; }
.ax-opt { color: var(--adm-muted); margin-left: 4px; font-size: .85em; }
.ax-control { position: relative; display: flex; align-items: center; }
.ax-input { box-sizing: border-box; width: 100%; height: 44px; padding: 0 14px; font: 400 15px/42px var(--font-sans); color: var(--adm-text); background: #fff; border: 1px solid var(--adm-border); border-radius: var(--radius-control); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.ax-input::placeholder { color: #b0b7c3; }
.ax-input:focus, .ax-input.is-focus { border-color: var(--adm-link); box-shadow: 0 0 0 3px rgba(47,128,237,.12); }
.ax-input.is-error { border-color: var(--adm-stat-red); color: var(--adm-stat-red); }
.ax-input.is-error::placeholder { color: var(--adm-stat-red); }
.ax-input:disabled { background: #f1f3f5; color: var(--adm-muted); cursor: not-allowed; }
.ax-input--icon { padding-left: 42px; }
.ax-input--right { padding-right: 42px; }
.ax-input-icon, .ax-input-right { position: absolute; top: 0; bottom: 0; width: 42px; display: flex; align-items: center; justify-content: center; color: var(--adm-muted); pointer-events: none; }
.ax-input-icon { left: 0; } .ax-input-right { right: 0; }
.ax-input-icon svg { width: 18px; height: 18px; } .ax-input-right svg { width: 16px; height: 16px; }
.ax-msg { font: 400 13px/18px var(--font-sans); margin: 0; color: var(--adm-stat-red); }
.ax-desc { font: 400 13px/18px var(--font-sans); margin: 0; color: var(--adm-muted); }
textarea.ax-input { height: auto; min-height: 110px; padding: 10px 14px; line-height: 22px; resize: vertical; }
.ax-counter { position: absolute; bottom: 6px; right: 12px; color: var(--adm-muted); font: 400 13px/18px var(--font-sans); }
/* NumberInput controls */
.ax-num-ctrl { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 28px; display: flex; flex-direction: column; border-left: 1px solid var(--adm-border); border-radius: 0 var(--radius-control) var(--radius-control) 0; overflow: hidden; }
.ax-num-ctrl span { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--adm-muted); cursor: pointer; }
.ax-num-ctrl span:hover { background: #f8fafc; color: var(--adm-text); }
.ax-num-ctrl span + span { border-top: 1px solid var(--adm-border); }
.ax-num-ctrl svg { width: 10px; height: 10px; }
/* MultiSelect */
.ax-multi { box-sizing: border-box; min-height: 44px; height: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 5px 42px 5px 8px; line-height: 20px; }
.ax-multi-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 12px; border-radius: var(--radius-full); background: var(--adm-tint-blue); color: var(--adm-link); font: 500 13px var(--font-sans); }
.ax-multi-pill svg { width: 12px; height: 12px; color: var(--adm-link); }
/* Select dropdown — admin BigSelect menu */
.ax-dropdown { margin-top: 4px; padding: 6px; border: 1px solid var(--adm-border); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.ax-option { padding: 10px 14px; font: 400 15px/20px var(--font-sans); border-radius: var(--radius-md); color: var(--adm-text); cursor: pointer; }
.ax-option.is-hover, .ax-option:hover { background: #f8fafc; }
.ax-option.is-selected { background: #eff6ff; color: var(--adm-link); font-weight: 600; }
/* Checkbox — admin Check */
.ax-check { width: 20px; height: 20px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; display: inline-block; vertical-align: middle; box-sizing: border-box; position: relative; flex: none; }
.ax-check.is-on { background: var(--adm-link); border-color: var(--adm-link); }
.ax-check.is-on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* Switch — admin settings toggle */
.ax-switch { display: inline-flex; align-items: center; gap: 12px; font: 400 15px/20px var(--font-sans); color: var(--adm-text); cursor: pointer; }
.ax-switch-track { position: relative; width: 44px; height: 24px; border-radius: var(--radius-pager); background: #e2e8f0; box-sizing: border-box; transition: background-color .15s; flex: none; }
.ax-switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.ax-switch.is-on .ax-switch-track { background: var(--adm-link); }
.ax-switch.is-on .ax-switch-track::after { left: 22px; }
.ax-switch.is-disabled { opacity: .5; cursor: not-allowed; }
/* PhoneInput */
.ax-phone-label { display: inline-block; font: 400 15px/20px var(--font-sans); color: var(--adm-text); }
.ax-phone { position: relative; display: flex; }
.ax-phone-flag { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 46px; display: flex; align-items: center; justify-content: center; border-right: 1px solid var(--adm-border); border-radius: var(--radius-control) 0 0 var(--radius-control); background: #f8fafc; }
.ax-phone-flag img { width: 18px; height: 12px; }
.ax-phone input { box-sizing: border-box; width: 100%; height: 44px; padding-left: 58px; font: 400 15px var(--font-sans); color: var(--adm-text); background: #fff; border: 1px solid var(--adm-border); border-radius: var(--radius-control); outline: none; }
.ax-phone input:focus { border-color: var(--adm-link); box-shadow: 0 0 0 3px rgba(47,128,237,.12); }
.ax-phone.is-error input { border-color: var(--adm-stat-red); color: var(--adm-stat-red); }
.ax-phone-msg { color: var(--adm-stat-red); font: 400 13px/18px var(--font-sans); }
/* FormTitle + FormSection — admin modal headings */
.ax-form-title { font: 400 24px/30px var(--font-sans); color: var(--adm-text); padding: 0 0 16px; margin-bottom: 20px; border-bottom: 1px solid var(--adm-border); }
.ax-form-section { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--adm-border); }
.ax-form-section__label { color: var(--adm-muted); font: 600 11px/16px var(--font-sans); text-transform: uppercase; letter-spacing: .04em; padding-top: 4px; }
.ax-form-section__body { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1023px) { .ax-form-section { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- DataTable — admin AdminTable ---------- */
.ax-table { background: var(--adm-card); border-radius: var(--adm-card-radius); box-shadow: var(--adm-card-shadow); overflow: hidden; font-family: var(--font-sans); color: var(--adm-text); }
.ax-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px; min-height: 28px; }
.ax-table-toolbar__left { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-right: auto; }
.ax-table-toolbar__icons { display: flex; gap: 14px; color: var(--adm-muted); }
.ax-icon-btn { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--adm-muted); cursor: pointer; }
.ax-icon-btn:hover { color: var(--adm-text); }
.ax-icon-btn svg { width: 20px; height: 20px; }
.ax-table table { width: 100%; border-collapse: collapse; }
.ax-table th { background: var(--adm-card); color: var(--adm-text); font: 600 15px/20px var(--font-sans); text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--adm-border); white-space: nowrap; }
.ax-table th .ax-col-sep { display: inline-block; vertical-align: middle; float: right; width: 14px; height: 14px; margin-left: 8px; background: radial-gradient(circle, #cbd5e1 1.2px, transparent 1.4px) 50% 50% / 100% 33.3% repeat-y; border: 0; opacity: 1; }
.ax-table td { color: var(--adm-text); font: 400 15px/22px var(--font-sans); padding: 16px; border-bottom: 1px solid var(--table-row-rule); vertical-align: middle; }
.ax-table tbody tr:last-child td { border-bottom: 0; }
.ax-table tbody tr:hover td, .ax-table tbody tr.is-hover td { background: var(--table-row-hover); }
.ax-table a, .ax-link { color: var(--adm-link); text-decoration: none; cursor: pointer; }
.ax-table a:hover, .ax-link:hover { text-decoration: underline; }
.ax-muted { color: var(--adm-muted); }
.ax-row-action { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--adm-border); background: #fff; border-radius: var(--radius-lg); color: var(--adm-muted); cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.ax-row-action:hover, .ax-row-action.is-hover { background: #f8fafc; border-color: #cbd5e1; color: var(--adm-text); }
.ax-row-action svg { width: 16px; height: 16px; }
.ax-row-action--approve, .ax-row-action--reject { width: 24px; height: 24px; border-radius: 50%; border: 0; color: #fff; }
.ax-row-action--approve { background: #22c55e; } .ax-row-action--reject { background: var(--adm-stat-red); }
.ax-row-action--approve:hover { background: #16a34a; color: #fff; } .ax-row-action--reject:hover { background: #dc2626; color: #fff; }
.ax-row-action--approve svg, .ax-row-action--reject svg { width: 12px; height: 12px; }
.ax-table-footer { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--adm-border); font: 400 15px/20px var(--font-sans); color: var(--adm-text); }
.ax-rows { display: inline-flex; align-items: center; gap: 12px; }
.ax-rows select { box-sizing: border-box; height: 38px; padding: 0 32px 0 12px; border: 1px solid var(--adm-border); border-radius: var(--radius-lg); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M8 9l4-4 4 4M16 15l-4 4-4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 14px; color: var(--adm-text); font: 400 15px var(--font-sans); -webkit-appearance: none; appearance: none; }
.ax-pager { display: inline-flex; gap: 8px; align-items: center; color: var(--adm-muted); }
.ax-pager span { box-sizing: border-box; min-width: 28px; height: 28px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--adm-muted); font: 500 14px var(--font-sans); cursor: pointer; }
.ax-pager span:hover { background: #f1f5f9; color: var(--adm-text); }
.ax-pager span.is-active { background: var(--adm-link); color: #fff; font-weight: 600; }
.ax-chip { display: inline-flex; height: 42px; max-width: 20rem; align-items: center; gap: 10px; border-radius: var(--radius-control); border: 1px solid var(--adm-border); background: #fff; padding: 0 16px; font: 400 15px var(--font-sans); color: var(--adm-text); box-sizing: border-box; }
.ax-chip svg { width: 14px; height: 14px; color: var(--adm-muted); }
.ax-chip svg.ax-chip-icon { width: 16px; height: 16px; color: var(--adm-text); }
.ax-chip--gray { border-color: var(--adm-border); background: #fff; color: var(--adm-text); }
.ax-chip--blue { border-color: var(--pill-active-border); background: var(--pill-active-bg); color: var(--adm-link); }
@media (max-width: 768px) { .ax-table th, .ax-table td { padding: 12px; } }

/* Standalone Pagination — admin pager (round blue active) */
.ax-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: var(--space-4) 0; color: var(--adm-muted); }
.ax-pagination span { box-sizing: border-box; min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--adm-muted); font: 500 15px var(--font-sans); }
.ax-pagination span:hover { background: #f1f5f9; color: var(--adm-text); }
.ax-pagination span.is-active { background: var(--adm-link); color: #fff; font-weight: 600; }
.ax-pagination span.is-dots { border: 0; background: none; }

/* Stat card — admin StatCard */
.ax-stat { display: flex; gap: 14px; align-items: flex-start; }
.ax-stat__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.ax-stat__value { font: 700 24px/28px var(--font-sans); }
.ax-stat__label { font: 400 14px/20px var(--font-sans); color: var(--adm-muted); margin-top: 2px; }
