@font-face { font-family: "Support Board Font"; src: url("../script/media/fonts/regular.woff2") format("woff2"); font-weight: 400; font-style: normal; }
@font-face { font-family: "Support Board Font"; src: url("../script/media/fonts/medium.woff2") format("woff2"); font-weight: 500; font-style: normal; }
@font-face { font-family: "Support Board Icons"; src: url("../script/media/icons/support-board.woff?v=4") format("woff"); font-weight: normal; font-style: normal; }

:root {
    color-scheme: light;
    --abadiy-accent: #ff1753;
    --abadiy-accent-hover: #dc0f43;
    --abadiy-accent-soft: #fff0f4;
    --abadiy-accent-border: #f4c5d1;
    --abadiy-ink: #172126;
    font-family: "Support Board Font", "Helvetica Neue", Arial, sans-serif;
    color: #566069;
    background: #f5f7fa;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f5f7fa; color: #566069; font-size: 14px; }
html, body.cloud-admin { max-width: 100%; overflow-x: hidden; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--abadiy-accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.icon::before, .icon-btn::before { font-family: "Support Board Icons"; font-style: normal; font-weight: normal; line-height: 1; }
.icon.dashboard::before { content: "\6a"; }
.icon.usage::before { content: "\59"; }
.icon.channels::before { content: "\69"; }
.icon.ai::before { content: "\e903"; }
.icon.billing::before { content: "\20b8"; font-family: "Support Board Font", Arial, sans-serif; font-weight: 500; }
.icon.modules::before { content: "\e90a"; }
.icon.health::before { content: "\e906"; }
.icon.users::before { content: "\6e"; }
.icon.plans::before { content: "\48"; }
.icon.logout::before, .icon.back::before { content: "\41"; }
.icon.chat::before { content: "\64"; }
.icon.plus::before { content: "\30"; }
.icon.search-icon::before { content: "\6f"; }
.icon-btn.edit::before { content: "\e905"; }
.icon-btn.open::before { content: "\75"; }
.icon-btn.users::before { content: "\6e"; }
.icon-btn.close::before { content: "\70"; }
.icon-btn.refresh::before { content: "\51"; }
.icon-btn.info::before { content: "\e907"; }
.icon-btn.deploy::before { content: "\66"; }
.icon-btn.previous::before { content: "\41"; }
.icon-btn.next::before { content: "\42"; }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; }
.login-box { width: min(500px, 100%); padding: 46px 40px 38px; border: 1px solid #d4d4d4; border-radius: 6px; background: #fff; text-align: center; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 auto 14px; }
.login-brand img { width: 132px; height: auto; display: block; }
.login-brand span { min-height: 24px; display: inline-flex; align-items: center; padding-left: 14px; color: #566069; border-left: 1px solid #d4d4d4; font-size: 13px; font-weight: 500; white-space: nowrap; }
.login-box > p { margin: 0 0 30px; color: #788692; }
.login-box form { display: grid; gap: 18px; text-align: left; }

.rail { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 65px; display: flex; flex-direction: column; align-items: center; background: #fff; border-right: 1px solid #d4d4d4; }
.rail-logo { width: 36px; height: 36px; margin: 19px 0 30px; display: grid; place-items: center; text-decoration: none; }
.rail-logo img { width: 34px; height: 34px; display: block; object-fit: contain; }
.rail nav { width: 100%; display: grid; gap: 2px; overflow-y: auto; scrollbar-width: none; }
.rail nav::-webkit-scrollbar { display: none; }
.rail .icon { position: relative; width: 100%; height: 50px; display: grid; place-items: center; color: #788692; text-decoration: none; font-size: 18px; transition: color .2s, background .2s; }
.rail .icon:hover, .rail .icon.active { color: var(--abadiy-accent); background: var(--abadiy-accent-soft); }
.rail .icon.active::after { content: ""; position: absolute; inset: 10px auto 10px 0; width: 2px; background: var(--abadiy-accent); }
.rail > .logout { margin-top: auto; margin-bottom: 15px; }

.admin-shell { width: calc(100% - 65px); max-width: calc(100vw - 65px); min-height: 100vh; margin-left: 65px; padding: 0 34px 40px; overflow-x: hidden; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #d4d4d4; }
.topbar h1 { margin: 0; color: var(--abadiy-ink); font-size: 20px; line-height: 26px; font-weight: 500; }
.topbar h1 + span { display: block; margin-top: 2px; color: #66727b; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.top-actions form { margin: 0; }

.btn { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s, opacity .2s; }
.btn.primary { color: #fff; background: var(--abadiy-accent); border-color: var(--abadiy-accent); }
.btn.primary:hover { background: var(--abadiy-accent-hover); border-color: var(--abadiy-accent-hover); }
.btn.secondary { color: #566069; background: #fff; border-color: #cdd2d7; }
.btn.secondary:hover { color: var(--abadiy-accent); border-color: var(--abadiy-accent); }
.btn.danger-button { color: #a33b3b; background: #fff; border-color: #e3c5c5; }
.btn.danger-button:hover { color: #8e2f2f; background: #fff5f4; border-color: #c98989; }
.btn:disabled, .icon-btn:disabled { cursor: default; opacity: .45; }
.btn.loading { color: transparent; position: relative; }
.btn.loading::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { margin: 20px 0 0; padding: 13px 16px; border: 1px solid; border-radius: 5px; font-size: 13px; }
.notice.error { color: #9f3030; background: #fff3f2; border-color: #efcecb; }
.notice.success { color: #21724d; background: #edf8f3; border-color: #c9e8d8; }

.metrics { margin-top: 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; }
.metrics article { min-width: 0; padding: 22px 24px; border-right: 1px solid #e4e7e9; }
.metrics article:last-child { border-right: 0; }
.metrics span { display: block; margin-bottom: 9px; color: #66727b; font-size: 12px; }
.metrics strong { display: block; overflow: hidden; color: #24272a; font-size: 19px; line-height: 24px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.metrics small { display: block; margin-top: 7px; overflow: hidden; color: #788692; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.metrics.compact { margin-bottom: 20px; }

.section-row, .section-block { margin-top: 20px; padding: 27px 28px; background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.section-row > div { min-width: 0; flex: 1; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title h2 { margin: 0; color: #24272a; font-size: 16px; font-weight: 500; }
.section-title > a { margin-left: auto; color: var(--abadiy-accent-hover); font-size: 12px; text-decoration: none; }
.details { margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px; }
.details div { min-width: 0; }
.details dt { margin-bottom: 7px; color: #66727b; font-size: 11px; }
.details dd { margin: 0; overflow: hidden; color: #3d4449; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.section-block code { display: block; margin-top: 18px; padding: 14px 16px; overflow-x: auto; color: #43505a; background: #f5f7fa; border: 1px solid #e1e5e8; border-radius: 4px; font: 12px/20px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }

.table-section { margin-top: 28px; background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; overflow: hidden; }
.table-tools { min-height: 58px; display: flex; align-items: center; justify-content: flex-end; padding: 0 18px; border-bottom: 1px solid #e1e4e6; }
.search { position: relative; width: min(270px, 100%); }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #66727b; font-size: 14px; }
.search input { padding-left: 37px; }
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; contain: inline-size; }
table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; }
th { padding: 13px 16px; color: #66727b; background: #f8f9fa; border-bottom: 1px solid #dfe3e5; font-size: 11px; font-weight: 500; text-align: left; text-transform: uppercase; }
td { padding: 14px 16px; border-bottom: 1px solid #e7eaec; color: #566069; font-size: 13px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfc; }
td strong, td small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td strong { color: #3a4146; font-weight: 500; }
td small { margin-top: 5px; color: #6d7880; font-size: 11px; }
td small.danger { color: #bd4141; }
#accounts-table { min-width: 1180px; }
#accounts-table th:nth-child(1) { width: 22%; } #accounts-table th:nth-child(2) { width: 17%; } #accounts-table th:nth-child(3) { width: 22%; } #accounts-table th:nth-child(4) { width: 18%; } #accounts-table th:nth-child(5) { width: 14%; } #accounts-table th:last-child { width: 78px; }
.client-tags { color: var(--abadiy-accent-hover); }
.plans-table th:first-child { width: 25%; } .plans-table th:last-child { width: 65px; }
.account-cell { min-width: 0; display: flex; align-items: center; gap: 12px; }
.account-cell > div { min-width: 0; }
.account-cell .account-state { width: fit-content; max-width: 100%; padding: 2px 6px; color: #765417; background: #fff3d9; border-radius: 3px; }
.account-cell .account-state.archived, .account-cell .account-state.failed, .account-cell .account-state.deletion_failed { color: #9f3030; background: #fce9e7; }
.account-cell .account-state.deleting { color: #176da4; background: #e6f2fc; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: var(--abadiy-accent-hover); background: var(--abadiy-accent-soft); border-radius: 50%; font-size: 13px; font-weight: 500; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-actions form { margin: 0; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; color: #788692; background: transparent; border: 0; border-radius: 4px; cursor: pointer; font-size: 15px; transition: color .2s, background .2s; }
.icon-btn:hover { color: var(--abadiy-accent); background: var(--abadiy-accent-soft); }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; color: #4f5b62; background: #edf0f2; border-radius: 4px; font-size: 11px; font-weight: 500; text-transform: capitalize; }
.badge.active, .badge.trialing { color: #21724d; background: #e8f6ef; }
.badge.suspended, .badge.past_due { color: #8d611a; background: #fff3d9; }
.badge.archived, .badge.canceled, .badge.cancelled, .badge.expired, .badge.failed { color: #9f3030; background: #fce9e7; }
.badge.provisioning { color: #176da4; background: #e6f2fc; }
.badge.migrating, .badge.review { color: #176da4; background: #e6f2fc; }
.badge.configured, .badge.unknown, .badge.unpriced { color: #8d611a; background: #fff3d9; }
.badge.inactive, .badge.offline, .badge.legacy { color: #69757d; background: #edf0f2; }
.badge.recommended { color: #176da4; background: #e6f2fc; }
.badge.available { color: #176da4; background: #e6f2fc; }
.badge.current, .badge.managed, .badge.completed { color: #21724d; background: #e8f6ef; }
.badge.queued, .badge.running, .badge.paused { color: #8d611a; background: #fff3d9; }
.badge.rolled_back { color: #69757d; background: #edf0f2; }
.badge.source { color: #5f4a8f; background: #eee9fa; }
.badge.relationship-lead, .badge.relationship-trial, .badge.pending, .badge.creating { color: #8d611a; background: #fff3d9; }
.badge.relationship-onboarding { color: #176da4; background: #e6f2fc; }
.badge.relationship-active_customer, .badge.paid { color: #21724d; background: #e8f6ef; }
.badge.relationship-overdue, .badge.relationship-churned, .badge.refunded { color: #9f3030; background: #fce9e7; }
.badge.relationship-paused, .badge.relationship-archived, .badge.relationship-internal, .badge.unpaid, .badge.canceled { color: #69757d; background: #edf0f2; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 20px; }
.dashboard-grid > .section-block, .dashboard-grid > .table-section { min-width: 0; }
.activity-chart { display: grid; gap: 10px; margin-top: 22px; }
.activity-chart.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.chart-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(80px, 1fr) 48px; align-items: center; gap: 10px; }
.chart-row time, .chart-row strong { color: #788692; font-size: 10px; font-weight: 400; }
.chart-row strong { overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.chart-track { height: 9px; display: flex; overflow: hidden; background: #edf0f2; border-radius: 2px; }
.chart-track i { display: block; height: 100%; min-width: 0; }
.chart-track .incoming, .chart-legend .incoming::before { background: var(--abadiy-accent); }
.chart-track .outgoing, .chart-legend .outgoing::before { background: #39a370; }
.chart-track .bot, .chart-legend .bot::before { background: #d39735; }
.chart-legend { margin-left: auto; display: flex; gap: 15px; color: #788692; font-size: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend span::before { content: ""; width: 7px; height: 7px; border-radius: 1px; }
.channel-list { display: grid; margin-top: 15px; }
.channel-list > div:not(.empty-state) { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e7eaec; }
.channel-list > div:last-child { border-bottom: 0; }
.channel-list span { color: #566069; font-size: 12px; }
.channel-list strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.empty-state { padding: 26px 12px; color: #788692; font-size: 12px; text-align: center; }
.section-table-title { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-bottom: 1px solid #e1e4e6; }
.section-table-title h2 { margin: 0; color: #3a4146; font-size: 14px; font-weight: 500; }
.section-table-title > span { color: #788692; font-size: 11px; }
.provider-strip { min-height: 76px; margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 15px 22px; background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; }
.provider-strip > div { display: grid; grid-template-columns: 12px auto; align-items: center; column-gap: 10px; }
.provider-strip strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.provider-strip small { grid-column: 2; margin-top: 4px; color: #788692; font-size: 11px; }
.status-dot { width: 8px; height: 8px; grid-row: 1 / span 2; background: #9ca6ad; border-radius: 50%; }
.status-dot.online { background: #39a370; }
.status-dot.offline { background: #d39735; }
.provider-strip dl { margin: 0; display: flex; gap: 34px; }
.provider-strip dl div { display: grid; gap: 4px; }
.provider-strip dt { color: #788692; font-size: 10px; }
.provider-strip dd { margin: 0; color: #3a4146; font-size: 12px; }
.billing-provider { margin-bottom: 20px; }
.billing-settings { margin-top: 0; }
.billing-settings-form { margin-top: 24px; }
.form-actions { display: flex; justify-content: flex-end; }
.billing-metrics { margin-top: 0; }
.billing-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.billing-action { min-width: 0; display: grid; align-content: start; gap: 18px; margin-top: 20px; }
.billing-action p, .qr-payment-result p { margin: 0; color: #66727b; font-size: 12px; line-height: 19px; }
.billing-action .btn { width: max-content; min-width: 150px; }
.billing-price { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 12px; background: #f8f9fa; border: 1px solid #dfe3e5; border-radius: 5px; }
.billing-price span { color: #788692; font-size: 11px; }
.billing-price strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.qr-payment-result { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.qr-payment-result > div { min-width: 0; display: grid; gap: 18px; }
.qr-payment-result img { width: 220px; height: 220px; flex: 0 0 220px; padding: 8px; object-fit: contain; background: #fff; border: 1px solid #dfe3e5; border-radius: 6px; }
.billing-orders table { min-width: 840px; }
.billing-orders th:nth-last-child(-n+2) { width: 145px; }
.models-table, .wallet-table { min-width: 560px; }
.positive { color: #21724d; }
.danger { color: #bd4141; }
.tenant-picker { width: min(360px, 100%); margin-top: 24px; }
.module-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.module-item { min-width: 0; padding: 20px; background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; }
.module-item.enabled { border-color: #afd8c4; }
.module-item header { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.module-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--abadiy-accent); background: var(--abadiy-accent-soft); border-radius: 5px; font-size: 17px; }
.module-item h2 { margin: 0; overflow: hidden; color: #3a4146; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.module-item header span { display: block; margin-top: 4px; color: #788692; font-size: 10px; }
.module-item p { min-height: 38px; margin: 17px 0; color: #66727b; font-size: 12px; line-height: 19px; }
.module-item footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 14px; color: #788692; border-top: 1px solid #e7eaec; font-size: 10px; }
.switch { display: block; position: relative; width: 34px; height: 19px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: absolute; inset: 0; margin: 0; background: #c5cbd0; border-radius: 10px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: transform .2s; }
.switch input:checked + span { background: #39a370; }
.switch input:checked + span::after { transform: translateX(15px); }
.switch input:disabled + span { opacity: .45; cursor: default; }
.usage-table table { min-width: 760px; }
#health-table { min-width: 1160px; }

.health-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.health-metrics article:nth-child(4) { border-right: 1px solid #e4e7e9; }
.account-metrics { margin-bottom: 0; }
.accounts-toolbar { min-height: 72px; margin-top: 20px; display: grid; grid-template-columns: minmax(250px, 1.5fr) repeat(4, minmax(135px, .72fr)) 40px; align-items: center; gap: 9px; padding: 15px 16px; background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; }
.accounts-toolbar select { height: 38px; font-size: 12px; }
.accounts-search { width: 100%; }
.accounts-search input { height: 38px; }
.accounts-reset { border: 1px solid #cdd2d7; }
.accounts-table-section { margin-top: 12px; }
.fleet-toolbar { min-height: 72px; margin-top: 20px; display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(6, minmax(125px, .75fr)) minmax(160px, .9fr) 40px; align-items: center; gap: 9px; padding: 15px 16px; background: #fff; border: 1px solid #d4d4d4; border-radius: 6px; }
.fleet-toolbar select { height: 38px; font-size: 12px; }
.fleet-search { width: 100%; }
.fleet-search input { height: 38px; }
.fleet-refresh { border: 1px solid #cdd2d7; }
.fleet-bulk { min-height: 58px; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 16px; color: #566069; background: #edf6fc; border: 1px solid #c9dfec; border-radius: 5px; }
.fleet-bulk > strong { color: #176da4; font-size: 12px; font-weight: 500; white-space: nowrap; }
.fleet-bulk > div { display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.fleet-bulk select { width: 180px; height: 38px; flex: 0 0 180px; font-size: 12px; }
.fleet-bulk .btn { min-height: 36px; padding: 0 13px; white-space: nowrap; }
.fleet-table-section { margin-top: 12px; }
.fleet-table-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 16px; color: #788692; border-bottom: 1px solid #e1e4e6; font-size: 11px; }
.fleet-table-head strong { color: #566069; font-weight: 500; }
.fleet-table-integrations { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.fleet-table-integrations form { margin: 0; }
.fleet-table-integrations .icon-btn { width: 30px; height: 30px; border: 1px solid #d7dde1; }
#health-table { min-width: 1320px; }
#health-table th:nth-child(1) { width: 42px; }
#health-table th:nth-child(2) { width: 230px; }
#health-table th:nth-child(3) { width: 145px; }
#health-table th:nth-child(4) { width: 175px; }
#health-table th:nth-child(5) { width: 215px; }
#health-table th:nth-child(6) { width: 170px; }
#health-table th:nth-child(7) { width: 150px; }
#health-table th:last-child { width: 150px; }
#health-table tr[data-management="archived"] { opacity: .68; }
.select-column { padding-right: 5px !important; padding-left: 15px !important; }
.table-checkbox { width: 18px; height: 18px; display: block; position: relative; cursor: pointer; }
.table-checkbox input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.table-checkbox span { position: absolute; inset: 1px; background: #fff; border: 1px solid #bfc7cc; border-radius: 3px; }
.table-checkbox input:checked + span { background: var(--abadiy-accent); border-color: var(--abadiy-accent); }
.table-checkbox input:checked + span::after { content: ""; position: absolute; top: 2px; left: 4px; width: 4px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.table-checkbox input:disabled + span { background: #edf0f2; border-color: #d9dee1; cursor: default; }
.installation-cell { min-width: 0; display: flex; align-items: center; gap: 11px; }
.installation-cell > div { min-width: 0; }
.installation-mark { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; color: #596870; background: #edf0f2; border-radius: 5px; font-size: 12px; font-weight: 500; }
.installation-mark.cloud { color: #176da4; background: #e6f2fc; }
.technical-name { color: #96a0a7 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px !important; }
.source-label { min-height: 18px; display: inline-flex; align-items: center; margin-left: 7px; padding: 0 6px; color: #176da4; background: #e6f2fc; border-radius: 3px; font-size: 9px; font-weight: 500; vertical-align: middle; }
.update-badge { min-height: 20px; margin-top: 7px; padding: 0 7px; font-size: 10px; }
.fleet-actions { flex-wrap: nowrap; }
.fleet-pagination { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 16px; color: #788692; border-top: 1px solid #e1e4e6; font-size: 11px; }
.fleet-pagination > div { display: flex; align-items: center; gap: 5px; }
.fleet-pagination select { width: 66px; height: 34px; padding: 0 8px; font-size: 11px; }
.maintenance-section { margin-top: 20px; }
.maintenance-table { min-width: 820px; }
.modal.large.fleet-modal { width: min(900px, calc(100% - 30px)); }
.installation-status-line { display: flex; flex-wrap: wrap; gap: 8px; }
.fleet-details { margin-top: 24px; }
.fleet-details .wide { grid-column: span 2; }
.fleet-details .wide dd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.app-version-list { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 7px; }
.app-version-list span { min-height: 28px; display: inline-flex; align-items: center; padding: 0 9px; color: #566069; background: #f5f7fa; border: 1px solid #dfe3e5; border-radius: 4px; font-size: 10px; }
.fleet-error { margin-top: 22px; }
.update-inspection { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #dfe3e5; border: 1px solid #dfe3e5; border-radius: 5px; overflow: hidden; }
.update-inspection > div { min-width: 0; padding: 15px; background: #f8f9fa; }
.update-inspection span, .update-inspection strong { display: block; }
.update-inspection span { margin-bottom: 7px; color: #788692; font-size: 10px; }
.update-inspection strong { overflow: hidden; color: #3a4146; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.change-preview { padding-top: 5px; }
.change-preview > strong { color: #3a4146; font-size: 12px; font-weight: 500; }
.change-preview > div { max-height: 180px; margin-top: 10px; padding: 12px 14px; overflow: auto; color: #66727b; background: #f8f9fa; border: 1px solid #e1e5e8; border-radius: 4px; font: 10px/18px ui-monospace, SFMono-Regular, Menlo, monospace; }
.change-preview > div span { display: block; }
.installation-jobs { display: grid; }
.installation-job { min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px; align-items: center; gap: 15px; border-bottom: 1px solid #e5e8ea; }
.installation-job:last-child { border-bottom: 0; }
.installation-job strong, .installation-job small { display: block; }
.installation-job strong { color: #3a4146; font-size: 12px; font-weight: 500; }
.installation-job small { margin-top: 5px; color: #788692; font-size: 10px; }
.fleet-modal-footer { justify-content: space-between !important; }
.fleet-modal-actions, .fleet-modal-management { display: flex; align-items: center; gap: 8px; }
.fleet-modal-footer .btn { padding: 0 13px; }
.installation-client-panel { align-content: start; gap: 22px; }
.installation-client-empty { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 8px; color: #788692; border: 1px dashed #ccd2d6; border-radius: 6px; text-align: center; }
.installation-client-empty[hidden] { display: none; }
.installation-client-empty strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.installation-client-empty > span:last-child { font-size: 11px; }
.installation-client-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--abadiy-accent); background: var(--abadiy-accent-soft); border-radius: 5px; font-size: 17px; }
.installation-client-card { border: 1px solid #dfe3e5; border-radius: 6px; overflow: hidden; }
.installation-client-card[hidden] { display: none; }
.client-card-heading { min-height: 78px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 18px; background: #f8f9fa; border-bottom: 1px solid #e1e5e8; }
.client-card-heading .avatar { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: #60717c; border-radius: 50%; font-size: 14px; }
.client-card-heading strong, .client-card-heading span { display: block; }
.client-card-heading strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.client-card-heading > div span { margin-top: 5px; color: #788692; font-size: 10px; }
.client-details { margin: 0; padding: 18px; }
.client-details a { color: var(--abadiy-accent-hover); text-decoration: none; }
.client-details a:hover { text-decoration: underline; }
.installation-client-actions { display: flex; gap: 8px; }
.installation-client-modal { width: min(760px, calc(100% - 30px)); }
.installation-link-fields { margin-top: 24px; padding-top: 22px; border-top: 1px solid #e1e5e8; }
.subsection-title { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.subsection-title strong { color: #3a4146; font-size: 12px; font-weight: 500; }
.subsection-title span { color: #879198; font-size: 10px; }
.purge-modal { width: min(640px, calc(100% - 30px)); }
.purge-content { display: grid; gap: 22px; }
.danger-notice { display: grid; gap: 6px; padding: 14px 16px; color: #7f3333; background: #fff6f5; border: 1px solid #e8c8c5; border-radius: 5px; }
.danger-notice strong { color: #842f2f; font-size: 12px; font-weight: 600; }
.danger-notice span { font-size: 11px; line-height: 17px; }
.purge-details { margin: 0; }
.purge-details dd { overflow-wrap: anywhere; }
.purge-modal label strong { color: #a33b3b; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.purge-modal footer .danger-button:not(:disabled) { color: #fff; background: #a33b3b; border-color: #a33b3b; }
.purge-modal footer .danger-button:not(:disabled):hover { color: #fff; background: #8e2f2f; border-color: #8e2f2f; }
.deletion-table { min-width: 850px; }
.migration-section { width: 100%; max-width: 100%; min-width: 0; margin-top: 20px; contain: layout paint inline-size; }
.migration-section .table-scroll { width: 100%; max-width: 100%; min-width: 0; }
.migration-table { min-width: 1040px; }
.migration-table th:nth-child(1) { width: 18%; }
.migration-table th:nth-child(2) { width: 22%; }
.migration-table th:nth-child(3) { width: 19%; }
.migration-table th:nth-child(4) { width: 16%; }
.migration-table th:nth-child(5) { width: 15%; }
.migration-table th:last-child { width: 190px; }
.migration-actions { min-width: 150px; align-items: center; }
.migration-actions .btn { min-height: 34px; padding: 0 11px; font-size: 11px; white-space: nowrap; }
.migration-modal { width: min(760px, calc(100% - 30px)); }
.migration-content { display: grid; gap: 22px; }
.migration-notice { margin: 0; display: grid; gap: 6px; color: #315d77; background: #f3f9fd; border-color: #c9dfec; }
.migration-notice strong { color: #28576f; font-size: 12px; font-weight: 600; }
.migration-notice span { font-size: 11px; line-height: 17px; }
.migration-source-details { margin: 0; padding-bottom: 20px; border-bottom: 1px solid #e1e5e8; }

label { min-width: 0; display: grid; gap: 8px; color: #566069; font-size: 12px; font-weight: 500; }
input, select, textarea { width: 100%; min-width: 0; color: #3c4449; background: #fff; border: 1px solid #cdd2d7; border-radius: 6px; transition: border-color .2s, box-shadow .2s; }
input, select { height: 40px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--abadiy-accent); box-shadow: 0 0 0 2px rgba(255,23,83,.1); outline: 0; }

.modal { width: min(620px, calc(100% - 30px)); max-height: calc(100vh - 34px); padding: 0; color: #566069; background: #fff; border: 0; border-radius: 7px; box-shadow: 0 8px 35px rgba(32,39,44,.2); overflow: hidden; }
.modal.large { width: min(760px, calc(100% - 30px)); }
.modal.large.account-modal { width: min(940px, calc(100% - 30px)); }
.modal::backdrop { background: rgba(36,39,42,.42); }
.modal > form { display: flex; max-height: calc(100vh - 34px); flex-direction: column; }
.modal header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid #dfe3e5; }
.modal header h2 { margin: 0; color: #24272a; font-size: 17px; font-weight: 500; }
.modal header span { display: block; margin-top: 5px; color: #6d7880; font-size: 11px; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal footer { min-height: 70px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 0 24px; background: #f8f9fa; border-top: 1px solid #dfe3e5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.form-grid .wide { grid-column: 1 / -1; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.checkbox input, .app-checks input { width: 16px; height: 16px; margin: 0; accent-color: var(--abadiy-accent); }
.input-action { display: flex; align-items: center; gap: 7px; }
.input-action input { flex: 1; }
.input-action .icon-btn { flex: 0 0 36px; border: 1px solid #cdd2d7; }
.modal-tabs { min-height: 48px; display: flex; align-items: end; gap: 24px; padding: 0 24px; border-bottom: 1px solid #dfe3e5; }
.modal-tabs button { position: relative; height: 48px; padding: 0; color: #788692; background: transparent; border: 0; cursor: pointer; font-size: 12px; }
.modal-tabs button.active { color: var(--abadiy-accent); }
.modal-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--abadiy-accent); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; }
.account-record-panel { gap: 0; }
.record-panel-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #e1e5e8; }
.record-panel-head strong, .record-panel-head span { display: block; }
.record-panel-head strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.record-panel-head span { margin-top: 5px; color: #788692; font-size: 11px; }
.record-panel-head .btn { flex: 0 0 auto; }
.account-record-list { display: grid; }
.account-record-row { min-height: 70px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, .55fr) 36px; align-items: center; gap: 18px; padding: 12px 0; border-bottom: 1px solid #e5e8ea; }
.account-record-row > div { min-width: 0; }
.account-record-row strong, .account-record-row span, .account-record-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-record-row strong { color: #3a4146; font-size: 12px; font-weight: 500; }
.account-record-row span { margin-top: 5px; color: #6d7880; font-size: 11px; }
.account-record-row > div:nth-child(2) { text-align: right; }
.account-record-row > div:nth-child(2) .badge { display: inline-flex; margin: 0; }
.account-record-row small { margin-top: 6px; color: #788692; font-size: 10px; }
.payment-summary { margin: 18px 0 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #dfe3e5; border: 1px solid #dfe3e5; border-radius: 5px; gap: 1px; overflow: hidden; }
.payment-summary > div { min-width: 0; padding: 14px 16px; background: #f8f9fa; }
.payment-summary span, .payment-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-summary span { margin-bottom: 7px; color: #788692; font-size: 10px; }
.payment-summary strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.booking-usage-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #dfe3e5; border-radius: 5px; background: #dfe3e5; gap: 1px; overflow: hidden; }
.booking-usage-summary > div { min-width: 0; padding: 12px 14px; background: #f8f9fa; }
.booking-usage-summary span, .booking-usage-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-usage-summary span { margin-bottom: 6px; color: #788692; font-size: 10px; }
.booking-usage-summary strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.subscription-settings { margin-top: 24px; padding-top: 22px; border-top: 1px solid #dfe3e5; }
.subsection-title strong, .subsection-title span { display: block; }
.subsection-title strong { color: #3a4146; font-size: 13px; font-weight: 500; }
.subsection-title span { margin-top: 5px; color: #788692; font-size: 11px; }
.footer-spacer { flex: 1; }
.record-delete { margin-right: auto; }
.app-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.app-checks label { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 0 13px; background: #f8f9fa; border: 1px solid #e1e5e8; border-radius: 5px; font-size: 12px; font-weight: 400; }
.app-checks.compact { margin-top: 2px; }
.security-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid #e5e8ea; }
.security-row:first-child { padding-top: 0; }
.security-row:last-child { border-bottom: 0; }
.security-row strong, .security-row span { display: block; }
.security-row strong { color: #3a4146; font-weight: 500; }
.security-row span { margin-top: 5px; color: #6d7880; font-size: 11px; }
.security-row .input-action { width: min(390px, 65%); }
.security-row.danger-zone { margin-top: 12px; padding: 18px; background: #fff8f7; border: 1px solid #ecd5d2; border-radius: 5px; }
.security-row.danger-zone strong { color: #8f3434; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
    .admin-shell { padding-right: 20px; padding-left: 20px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics article:nth-child(2) { border-right: 0; }
    .metrics article:nth-child(-n+2) { border-bottom: 1px solid #e4e7e9; }
    .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .activity-chart.wide { grid-template-columns: 1fr; }
    .health-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .health-metrics article:nth-child(3) { border-right: 0; }
    .health-metrics article:nth-child(-n+3) { border-bottom: 1px solid #e4e7e9; }
    .fleet-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fleet-search { grid-column: span 2; }
    .fleet-refresh { justify-self: end; }
    .accounts-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .accounts-search { grid-column: span 2; }
    .accounts-reset { justify-self: end; }
    .fleet-modal-footer { align-items: stretch !important; flex-direction: column; padding: 12px 18px !important; }
    .fleet-modal-actions, .fleet-modal-management { flex-wrap: wrap; }
}

@media (max-width: 640px) {
    .rail { width: 54px; }
    .rail-logo { width: 32px; height: 32px; margin-top: 15px; }
    .admin-shell { width: calc(100% - 54px); max-width: calc(100vw - 54px); margin-left: 54px; padding: 0 12px 25px; }
    .topbar { min-height: 70px; align-items: flex-start; flex-direction: column; justify-content: center; padding: 12px 0; }
    .top-actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
    .top-actions .btn { white-space: nowrap; }
    .metrics { margin-top: 18px; }
    .metrics article { padding: 17px; }
    .metrics strong { font-size: 16px; }
    .section-row { align-items: stretch; flex-direction: column; }
    .details, .form-grid, .app-checks { grid-template-columns: 1fr; }
    .module-grid { grid-template-columns: 1fr; }
    .billing-actions-grid { grid-template-columns: 1fr; }
    .provider-strip { align-items: flex-start; flex-direction: column; }
    .provider-strip dl { width: 100%; justify-content: space-between; }
    .health-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .health-metrics article:nth-child(2n) { border-right: 0; }
    .health-metrics article:nth-child(3) { border-right: 1px solid #e4e7e9; }
    .health-metrics article:nth-child(-n+4) { border-bottom: 1px solid #e4e7e9; }
    .fleet-toolbar { grid-template-columns: 1fr 1fr; padding: 12px; }
    .fleet-search { grid-column: 1 / -1; }
    .fleet-toolbar select:last-of-type { grid-column: 1 / -1; }
    .accounts-toolbar { grid-template-columns: 1fr 1fr; padding: 12px; }
    .accounts-search { grid-column: 1 / -1; }
    .accounts-toolbar select:last-of-type { grid-column: 1 / -1; }
    .accounts-reset { justify-self: end; }
    #accounts-table { min-width: 100%; table-layout: fixed; }
    #accounts-table th:nth-child(2), #accounts-table td:nth-child(2),
    #accounts-table th:nth-child(3), #accounts-table td:nth-child(3),
    #accounts-table th:nth-child(5), #accounts-table td:nth-child(5) { display: none; }
    #accounts-table th:nth-child(1) { width: 48%; }
    #accounts-table th:nth-child(4) { width: 34%; }
    #accounts-table th:last-child { width: 18%; }
    #accounts-table th, #accounts-table td { padding-right: 8px; padding-left: 8px; }
    #accounts-table .avatar { display: none; }
    #accounts-table .account-cell { gap: 0; }
    .fleet-bulk { align-items: flex-start; flex-direction: column; }
    .fleet-bulk > div { width: 100%; padding-bottom: 2px; }
    .fleet-table-head { align-items: flex-start; flex-direction: column; gap: 5px; padding-top: 12px; padding-bottom: 12px; }
    .fleet-table-integrations { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
    #health-table { min-width: 100%; table-layout: fixed; }
    #health-table th:nth-child(3), #health-table td:nth-child(3),
    #health-table th:nth-child(5), #health-table td:nth-child(5),
    #health-table th:nth-child(6), #health-table td:nth-child(6),
    #health-table th:nth-child(7), #health-table td:nth-child(7) { display: none; }
    #health-table th:nth-child(1) { width: 32px; }
    #health-table th:nth-child(2) { width: 120px; }
    #health-table th:nth-child(4) { width: 86px; }
    #health-table th:last-child { width: 72px; }
    #health-table th, #health-table td { padding-right: 8px; padding-left: 8px; }
    #health-table .installation-mark { display: none; }
    #health-table .installation-cell { gap: 0; }
    #health-table .fleet-actions .open, #health-table .fleet-actions .refresh, #health-table .fleet-actions .deploy { display: none; }
    #health-table .fleet-actions { gap: 0; }
    .maintenance-table { min-width: 100%; table-layout: fixed; }
    .maintenance-table th:nth-child(3), .maintenance-table td:nth-child(3),
    .maintenance-table th:nth-child(4), .maintenance-table td:nth-child(4),
    .maintenance-table th:nth-child(6), .maintenance-table td:nth-child(6) { display: none; }
    .maintenance-table th:nth-child(1) { width: 42%; }
    .maintenance-table th:nth-child(2) { width: 30%; }
    .maintenance-table th:nth-child(5) { width: 28%; }
    .maintenance-table th, .maintenance-table td { padding-right: 8px; padding-left: 8px; }
    .deletion-table th:nth-child(2), .deletion-table td:nth-child(2),
    .deletion-table th:nth-child(3), .deletion-table td:nth-child(3) { display: none; }
    .deletion-table th:nth-child(4), .deletion-table td:nth-child(4) { display: table-cell; width: 28%; }
    .deletion-table th:nth-child(1) { width: 44%; }
    .deletion-table th:nth-child(5) { width: 28%; }
    .fleet-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .update-inspection { grid-template-columns: 1fr; }
    .installation-job { grid-template-columns: 1fr auto; padding: 12px 0; }
    .installation-job > :last-child { grid-column: 1 / -1; }
    .fleet-modal-actions, .fleet-modal-management { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fleet-modal-footer .btn { width: 100%; padding: 0 10px; }
    .chart-legend { width: 100%; margin: 10px 0 0; flex-wrap: wrap; }
    .form-grid .wide { grid-column: auto; }
    .modal-tabs { gap: 18px; overflow-x: auto; }
    .modal-tabs button { flex: 0 0 auto; }
    .security-row { align-items: stretch; flex-direction: column; }
    .security-row .input-action { width: 100%; flex-wrap: wrap; }
    .record-panel-head { align-items: stretch; flex-direction: column; }
    .record-panel-head .btn { width: 100%; }
    .account-record-row { grid-template-columns: minmax(0, 1fr) 34px; gap: 10px; }
    .account-record-row > div:nth-child(2) { grid-column: 1; grid-row: 2; text-align: left; }
    .account-record-row > .icon-btn { grid-column: 2; grid-row: 1 / span 2; }
    .payment-summary { grid-template-columns: 1fr; }
    .booking-usage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .record-delete { width: auto; }
    .qr-payment-result { align-items: flex-start; flex-direction: column; }
    .qr-payment-result img { width: min(220px, 100%); height: auto; aspect-ratio: 1; }
    .billing-action .btn, .billing-settings-form .btn { width: 100%; }
    .login-box { padding: 36px 24px 30px; }
}
