/* AyaPOS cloud theme. Flat colours only: no gradients, no glows. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans/latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans/latin-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans/latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans/latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans/latin-ext-500.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans/latin-ext-600.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Tokens (design-system/ayapos/MASTER.md). */
:root {
    --aya-primary: #4F2A8A; --aya-primary-hover: #432377; --aya-primary-tint: #F3EFF9;
    --aya-text: #18181B; --aya-muted: #52525B; --aya-border: #E4E4E7; --aya-grid: #F4F4F5;
    --aya-surface: #FFFFFF; --aya-bg: #FAFAFA;
    --aya-warning: #B45309; --aya-danger: #B91C1C; --aya-success: #15803D;
    /* Data marks: the primary hue stepped into the chart lightness band, and the comparison grey. */
    --aya-chart: #5B34A0; --aya-chart-muted: #71717A;
}

body, .fi-body, input, select, textarea, button {
    font-family: 'IBM Plex Sans', 'Noto Sans SC', ui-sans-serif, system-ui, sans-serif;
    font-feature-settings: 'tnum' 1;
}

/* Flat surfaces: drop shadows go, 1px hairlines stay. Rings (button outlines, focus) are left alone. */
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat, .fi-simple-main { box-shadow: none !important; border: 1px solid var(--aya-border); border-radius: 8px; }
.fi-btn, .fi-input-wrp, .fi-fo-repeater-item, .fi-tabs { --tw-shadow: 0 0 #0000 !important; --tw-shadow-colored: 0 0 #0000 !important; }
.fi-btn, .fi-input-wrp, .fi-sidebar-item-button, .fi-dropdown-list-item, .fi-tabs-item { border-radius: 6px; }
.fi-badge { border-radius: 4px; }

/* Shell: white navigation, hairlines between the regions. */
.fi-topbar nav, .fi-sidebar-header { box-shadow: none !important; border-bottom: 1px solid var(--aya-border); }
.fi-sidebar-nav { row-gap: 24px; padding: 16px 16px 24px; scrollbar-width: thin; scrollbar-color: #D4D4D8 transparent; }
.fi-sidebar-group-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-muted); }
.fi-sidebar-item-icon { width: 20px; height: 20px; }
.fi-sidebar-item-active > .fi-sidebar-item-button { background-color: var(--aya-primary-tint); }
@media (min-width: 1024px) {
    .fi-sidebar { background-color: var(--aya-surface) !important; border-right: 1px solid var(--aya-border); }
}

/* Type scale for pages: h1 24/32, section titles 16/24, table text 14/20. */
.fi-header-heading { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: 0; }
.fi-header-subheading { font-size: 14px; line-height: 20px; color: var(--aya-muted); }
.fi-simple-header-heading { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: 0; }

/* Tables: 40px rows, quiet headers, numbers in tabular digits. */
.fi-ta-header-cell { padding-top: 10px; padding-bottom: 10px; }
.fi-ta-header-cell-label { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--aya-muted); }
.fi-ta-text, .fi-ta-icon, .fi-ta-toggle, .fi-ta-color, .fi-ta-image, .fi-ta-actions-cell > div, .fi-ta-selection-cell { padding-top: 8px; padding-bottom: 8px; }
.fi-ta-text-item-label { font-variant-numeric: tabular-nums; }
.fi-ta-empty-state-heading { font-size: 16px; line-height: 24px; font-weight: 600; }
.fi-ta-empty-state-description { font-size: 14px; line-height: 20px; color: var(--aya-muted); }

.ayapos-checklist { display: grid; gap: 8px; }
.ayapos-checklist-count { font-size: 14px; line-height: 20px; color: var(--aya-muted); }
.ayapos-checklist-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid var(--aya-border); border-radius: 6px; font-size: 14px; line-height: 20px; }
.ayapos-checklist-row .state { font-size: 12px; line-height: 16px; font-weight: 500; padding: 0 8px; border-radius: 4px; height: 24px; display: inline-flex; align-items: center; white-space: nowrap; }
.ayapos-checklist-row .state.done { color: var(--aya-success); border: 1px solid var(--aya-success); }
.ayapos-checklist-row .state.todo { color: var(--aya-muted); border: 1px solid var(--aya-border); }
.ayapos-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: 0; }
.ayapos-qr svg { width: 192px; height: 192px; border: 1px solid var(--aya-border); border-radius: 8px; padding: 12px; background: var(--aya-surface); }

/* Outlet switcher */
.ayapos-outlet-switcher { display: flex; align-items: center; gap: 8px; }
.ayapos-outlet-switcher label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-muted); }
.ayapos-outlet-switcher select { height: 36px; min-width: 200px; max-width: 280px; padding: 0 32px 0 12px; border: 1px solid #D4D4D8; border-radius: 6px; background-color: var(--aya-surface); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--aya-text); text-overflow: ellipsis; box-shadow: none; }
.ayapos-outlet-switcher select:focus { border-color: var(--aya-primary); outline: 2px solid var(--aya-primary); outline-offset: -1px; box-shadow: none; }
.ayapos-outlet-switcher select:disabled { opacity: .6; }
@media (max-width: 639px) {
    .ayapos-outlet-switcher label { display: none; }
    .ayapos-outlet-switcher select { min-width: 0; width: 100%; max-width: 180px; }
}

/* Floorplan editor */
.ayapos-floor { position: relative; width: 100%; aspect-ratio: 16 / 10; background: var(--aya-bg); border: 1px solid var(--aya-border); border-radius: 8px; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M24 0H0V24' fill='none' stroke='%23E4E4E7' stroke-width='1'/%3E%3C/svg%3E"); }
.ayapos-floor .t { position: absolute; display: flex; align-items: center; justify-content: center; flex-direction: column; background: var(--aya-surface); border: 1px solid var(--aya-muted); border-radius: 6px; cursor: move; user-select: none; touch-action: none; font-size: 13px; line-height: 16px; }
.ayapos-floor .t.round { border-radius: 9999px; }
.ayapos-floor .t.sel { border: 2px solid var(--aya-primary); color: var(--aya-primary); }
.ayapos-floor .t .h { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--aya-primary); border-radius: 2px; cursor: nwse-resize; }

/* Plain data tables used on report pages. */
.ayapos-num { font-variant-numeric: tabular-nums; text-align: right; }
.ayapos-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.ayapos-table th { text-align: left; font-weight: 500; color: var(--aya-muted); border-bottom: 1px solid var(--aya-border); padding: 8px 12px; white-space: nowrap; }
.ayapos-table th.num, .ayapos-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ayapos-table td { border-bottom: 1px solid var(--aya-border); padding: 8px 12px; }
.ayapos-table th:first-child, .ayapos-table td:first-child { padding-left: 0; }
.ayapos-table th:last-child, .ayapos-table td:last-child { padding-right: 0; }
.ayapos-table tbody tr:last-child td { border-bottom: 0; }
.ayapos-table tfoot td { border-top: 1px solid var(--aya-border); border-bottom: 0; font-weight: 600; }
.ayapos-table-scroll { overflow-x: auto; }
.ayapos-table td.ayapos-none { padding: 24px 0; color: var(--aya-muted); text-align: center; }
.ayapos-table td.ayapos-short { color: var(--aya-danger); }
.ayapos-table td.nowrap { white-space: nowrap; }
.ayapos-stock .ayapos-muted { color: var(--aya-muted); margin-left: 6px; }
.ayapos-stock td.ayapos-stock-actions { text-align: right; white-space: nowrap; }
.ayapos-stock td.ayapos-stock-actions > * { display: inline-flex; vertical-align: middle; margin-left: 8px; }
.ayapos-stock .ayapos-stock-pending { display: inline-flex; margin-left: 8px; vertical-align: middle; }
.ayapos-table td.ayapos-warn { color: var(--aya-warning); }
.ayapos-table td.ayapos-bad { color: var(--aya-danger); }
.ayapos-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; height: 160px; padding-top: 8px; border-bottom: 1px solid var(--aya-border); }
.ayapos-bars .b { flex: 1 1 0; max-width: 24px; min-height: 1px; background: #A1A1AA; border-radius: 4px 4px 0 0; }
.ayapos-bars .b.peak { background: var(--aya-chart); }
.ayapos-bars .b:hover { background: var(--aya-chart-muted); }
.ayapos-bars .b.peak:hover { background: var(--aya-primary-hover); }
.ayapos-axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--aya-muted); }

/* Report filters: one row above everything they scope. */
.ayapos-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.ayapos-filters label { display: block; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--aya-muted); }
.ayapos-filters label > span { display: block; margin-bottom: 4px; }
.ayapos-filters .ayapos-check { display: inline-flex; align-items: center; gap: 8px; height: 36px; color: var(--aya-text); font-weight: 400; font-size: 14px; }
.ayapos-hint { margin: 12px 0 0; font-size: 12px; line-height: 16px; color: var(--aya-muted); }
.ayapos-report { display: grid; gap: 24px; min-width: 0; transition: opacity .15s ease; }
.ayapos-report.is-loading { opacity: .5; }

.ayapos-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ayapos-link { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--aya-primary); white-space: nowrap; }
.ayapos-link:hover { text-decoration: underline; }
.ayapos-link:focus-visible { outline: 2px solid var(--aya-primary); outline-offset: 2px; border-radius: 2px; }

/* ---------- Dashboard ---------- */
.ayapos-dash, .ayapos-dash-body { display: grid; gap: 24px; min-width: 0; }
.ayapos-dash-body { transition: opacity .15s ease; }
.ayapos-dash-body.is-loading { opacity: .5; }

.ayapos-dash-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.ayapos-seg { display: inline-flex; justify-self: start; max-width: 100%; overflow-x: auto; gap: 2px; padding: 1px; border: 1px solid var(--aya-border); border-radius: 6px; background: var(--aya-surface); }
.ayapos-seg button { height: 32px; padding: 0 12px; border-radius: 4px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--aya-muted); white-space: nowrap; }
.ayapos-seg button:hover { color: var(--aya-text); background: var(--aya-bg); }
.ayapos-seg button.is-active { color: var(--aya-primary); background: var(--aya-primary-tint); }
.ayapos-seg button:focus-visible { outline: 2px solid var(--aya-primary); outline-offset: 1px; }
.ayapos-dash-period { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; font-size: 14px; line-height: 20px; color: var(--aya-text); }
.ayapos-dash-period strong { font-weight: 600; }
.ayapos-dash-period span { font-size: 13px; color: var(--aya-muted); }

.ayapos-note { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; background: var(--aya-surface); border: 1px solid var(--aya-border); border-left: 4px solid var(--aya-warning); border-radius: 6px; font-size: 14px; line-height: 20px; color: var(--aya-text); }
.ayapos-note strong { font-weight: 600; }
.ayapos-note span { color: var(--aya-muted); }

/* Headline figures */
.ayapos-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.ayapos-kpi { min-width: 0; padding: 16px 24px; background: var(--aya-surface); border: 1px solid var(--aya-border); border-radius: 8px; }
.ayapos-kpi-label { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--aya-muted); }
/* Large standalone figures use proportional digits; tabular digits are for columns. */
.ayapos-kpi-value { margin-top: 4px; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--aya-text); font-feature-settings: 'tnum' 0; white-space: nowrap; }
.ayapos-kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 20px; margin-top: 8px; }
.ayapos-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 20px; font-weight: 500; white-space: nowrap; }
.ayapos-delta.is-up { color: var(--aya-success); }
.ayapos-delta.is-down { color: var(--aya-danger); }
.ayapos-delta.is-flat { color: var(--aya-muted); }
.ayapos-kpi-vs { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-muted); }

/* Cards on a 12-column grid */
.ayapos-dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.ayapos-span-12 { grid-column: span 12; }
.ayapos-span-8 { grid-column: span 8; }
.ayapos-span-6 { grid-column: span 6; }
.ayapos-span-4 { grid-column: span 4; }
.ayapos-card { min-width: 0; padding: 24px; background: var(--aya-surface); border: 1px solid var(--aya-border); border-radius: 8px; }
.ayapos-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ayapos-card-head h2 { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--aya-text); }
.ayapos-card-head p { margin: 0; font-size: 13px; line-height: 20px; color: var(--aya-muted); }
.ayapos-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 160px; text-align: center; font-size: 14px; line-height: 20px; }
.ayapos-empty strong { font-weight: 600; color: var(--aya-text); }
.ayapos-empty span { max-width: 360px; color: var(--aya-muted); }
.ayapos-empty a { margin-top: 8px; }
.ayapos-step { display: flex; flex-direction: column; min-width: 0; }
.ayapos-step strong { font-weight: 500; color: var(--aya-text); }
.ayapos-step span { font-size: 13px; color: var(--aya-muted); }
.ayapos-step-end { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* Charts: thin marks, hairline grid, text in text colours. */
.ayapos-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 16px; font-size: 13px; line-height: 20px; color: var(--aya-muted); }
.ayapos-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ayapos-key { flex: 0 0 auto; display: inline-block; width: 16px; height: 2px; border-radius: 1px; background: var(--aya-chart); }
.ayapos-key.is-previous { background: var(--aya-chart-muted); }
.ayapos-key.is-bar { width: 8px; height: 8px; border-radius: 2px; }
.ayapos-key.is-none { width: 8px; background: transparent; }
.ayapos-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 240px auto; column-gap: 12px; margin-top: 8px; }
.ayapos-yaxis { grid-row: 1; grid-column: 1; display: flex; flex-direction: column-reverse; justify-content: space-between; margin: -8px 0; text-align: right; font-size: 12px; line-height: 16px; color: var(--aya-muted); white-space: nowrap; }
.ayapos-plot { grid-row: 1; grid-column: 2; position: relative; }
.ayapos-plot:focus { outline: none; }
.ayapos-plot:focus-visible { outline: 2px solid var(--aya-primary); outline-offset: 4px; border-radius: 2px; }
.ayapos-gridline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--aya-grid); }
.ayapos-gridline.is-base { border-top-color: var(--aya-border); }
.ayapos-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ayapos-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ayapos-line.is-current { stroke: var(--aya-chart); }
.ayapos-line.is-previous { stroke: var(--aya-chart-muted); }
.ayapos-area { fill: var(--aya-chart); fill-opacity: .1; }
.ayapos-dot { position: absolute; width: 12px; height: 12px; margin: 0 0 -6px -6px; border: 2px solid var(--aya-surface); border-radius: 50%; background: var(--aya-chart); pointer-events: none; }
.ayapos-dot.is-previous { background: var(--aya-chart-muted); }
.ayapos-endlabel { position: absolute; padding: 0 4px; transform: translate(-50%, -10px); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-text); white-space: nowrap; pointer-events: none; }
.ayapos-endlabel.is-first { transform: translate(-8px, -10px); }
.ayapos-endlabel.is-last { transform: translate(calc(-100% + 8px), -10px); }
.ayapos-crosshair { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--aya-muted); pointer-events: none; }
.ayapos-tip { position: absolute; top: 0; z-index: 5; min-width: 176px; padding: 8px 12px; transform: translateX(12px); background: var(--aya-surface); border: 1px solid var(--aya-border); border-radius: 6px; box-shadow: 0 4px 12px rgba(24, 24, 27, .08); font-size: 13px; line-height: 20px; pointer-events: none; }
.ayapos-tip.is-left { transform: translateX(calc(-100% - 12px)); }
.ayapos-tip.is-col { top: auto; left: 50%; transform: translate(-50%, -12px); }
.ayapos-tip.is-col.is-left { transform: translate(calc(-100% + 12px), -12px); }
.ayapos-tip-title { margin-bottom: 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-muted); white-space: nowrap; }
.ayapos-tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ayapos-tip-row strong { font-weight: 600; color: var(--aya-text); font-variant-numeric: tabular-nums; }
.ayapos-tip-row span { color: var(--aya-muted); }
.ayapos-xaxis { grid-row: 2; grid-column: 2; position: relative; height: 24px; font-size: 12px; line-height: 16px; color: var(--aya-muted); }
.ayapos-xaxis span { position: absolute; top: 8px; transform: translateX(-50%); white-space: nowrap; }
.ayapos-xaxis.is-cols { display: flex; height: auto; padding-top: 8px; }
.ayapos-xaxis.is-cols span { position: static; flex: 1 1 0; min-width: 0; transform: none; text-align: center; overflow: visible; }
.ayapos-xaxis.is-cols span.is-today { font-weight: 500; color: var(--aya-text); }
.ayapos-cols { position: absolute; inset: 0; display: flex; align-items: stretch; }
.ayapos-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.ayapos-col:focus { outline: none; }
.ayapos-col:focus-visible { outline: 2px solid var(--aya-primary); outline-offset: -2px; border-radius: 4px; }
.ayapos-col-bar { width: calc(100% - 2px); max-width: 24px; min-height: 1px; background: var(--aya-chart); border-radius: 4px 4px 0 0; }
.ayapos-col:hover .ayapos-col-bar, .ayapos-col:focus-visible .ayapos-col-bar { background: var(--aya-primary-hover); }
.ayapos-col-label { position: absolute; left: 50%; padding-bottom: 4px; transform: translateX(-50%); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-text); white-space: nowrap; pointer-events: none; }
.ayapos-col-label.is-first { left: 0; transform: none; }
.ayapos-col-label.is-last { left: auto; right: 0; transform: none; }

/* Ranked lists: one hue, bars from a shared baseline, figures in their own columns. */
.ayapos-rank { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.ayapos-rank th { padding: 0 0 8px; text-align: left; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-muted); white-space: nowrap; }
.ayapos-rank td { padding: 10px 0; border-top: 1px solid var(--aya-grid); vertical-align: top; color: var(--aya-text); }
.ayapos-rank th.num, .ayapos-rank td.num { padding-left: 16px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ayapos-rank td.name { width: 100%; max-width: 0; }
.ayapos-rank td.name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ayapos-rank td.name i { display: block; height: 8px; min-width: 2px; margin-top: 6px; background: var(--aya-chart); border-radius: 0 4px 4px 0; }
.ayapos-rank td.sub { color: var(--aya-muted); }
.ayapos-rank td.ayapos-none { padding: 24px 0; color: var(--aya-muted); text-align: center; }

/* Outlet state: every status has a text label, colour only supports it. */
.ayapos-states { display: grid; gap: 24px; }
.ayapos-state-group h3 { margin: 0 0 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--aya-text); }
.ayapos-state-group dl { display: grid; margin: 0; }
.ayapos-state { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 12px; padding: 12px 0; border-top: 1px solid var(--aya-grid); }
.ayapos-state:first-child { padding-top: 0; border-top: 0; }
.ayapos-state:last-child { padding-bottom: 0; }
.ayapos-state dt { font-size: 13px; line-height: 24px; font-weight: 500; color: var(--aya-muted); }
.ayapos-state dd { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; margin: 0; }
.ayapos-state-detail { font-size: 13px; line-height: 20px; color: var(--aya-muted); }
.ayapos-tag { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border: 1px solid var(--aya-border); border-radius: 4px; background: var(--aya-surface); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--aya-text); white-space: nowrap; }
.ayapos-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--aya-success); }
.ayapos-tag.is-warn { border-color: var(--aya-warning); color: var(--aya-warning); }
.ayapos-tag.is-warn i { background: var(--aya-warning); }
.ayapos-tag.is-off { color: var(--aya-muted); }
.ayapos-tag.is-off i { background: transparent; border: 1px solid var(--aya-muted); }
.ayapos-tag.is-bad { border-color: var(--aya-danger); color: var(--aya-danger); }
.ayapos-tag.is-bad i { background: var(--aya-danger); }
.ayapos-state-value { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--aya-text); }
.ayapos-block + .ayapos-block { margin-top: 24px; }
.ayapos-block-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; font-size: 14px; line-height: 20px; }
.ayapos-block-head strong { font-weight: 600; color: var(--aya-text); }
.ayapos-block-head span { font-size: 13px; color: var(--aya-muted); }
.ayapos-quiet { margin: 0; font-size: 14px; line-height: 20px; color: var(--aya-muted); }

@media (max-width: 1279px) {
    .ayapos-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ayapos-span-8, .ayapos-span-6, .ayapos-span-4 { grid-column: span 12; }
}
@media (max-width: 639px) {
    .ayapos-dash, .ayapos-dash-body, .ayapos-dash-grid, .ayapos-kpis { gap: 16px; }
    .ayapos-kpis { grid-template-columns: minmax(0, 1fr); }
    .ayapos-card { padding: 16px; }
    .ayapos-chart { grid-template-rows: 200px auto; }
}
@media (prefers-reduced-motion: reduce) {
    .ayapos-dash-body { transition: none; }
}

/* =====================================================================
   Polish, motion and loading states (back-office shell)
   ===================================================================== */

/* Page header: title on the left, actions on the right, a hairline under it. */
.fi-header { padding-bottom: 16px; border-bottom: 1px solid var(--aya-border); }
.fi-breadcrumbs { margin-bottom: 4px; }
.fi-breadcrumbs-item-label { font-size: 13px; color: var(--aya-muted); }

/* Sidebar: quieter items, a clear current page. */
.fi-sidebar-item-button { padding: 7px 10px; gap: 10px; transition: background-color .12s ease, color .12s ease; }
.fi-sidebar-item-label { font-size: 14px; line-height: 20px; font-weight: 500; }
.fi-sidebar-item-active .fi-sidebar-item-label { color: var(--aya-primary); font-weight: 600; }
.fi-sidebar-item-active .fi-sidebar-item-icon { color: var(--aya-primary); }
.fi-sidebar-item-button:hover { background-color: var(--aya-bg); }
.fi-sidebar-item-active > .fi-sidebar-item-button:hover { background-color: var(--aya-primary-tint); }
.fi-topbar nav { min-height: 56px; }

/* Tables: denser rows, a header band, hover that shows the row is clickable. */
.fi-ta-header-ctn, .fi-ta-header-toolbar { padding-top: 10px; padding-bottom: 10px; }
.fi-ta-table thead tr { background-color: var(--aya-bg); }
.fi-ta-row { transition: background-color .12s ease; }
.fi-ta-row:hover { background-color: #FAF8FD; }
.fi-ta-actions { gap: 4px; }
.fi-ta-actions .fi-link { padding: 4px 8px; border-radius: 6px; transition: background-color .12s ease; }
.fi-ta-actions .fi-link:hover { background-color: var(--aya-primary-tint); text-decoration: none; }
.fi-ta-empty-state { padding-top: 48px; padding-bottom: 48px; }
.fi-ta-empty-state-icon-ctn { background-color: var(--aya-primary-tint); border-radius: 8px; }
.fi-ta-empty-state-icon { color: var(--aya-primary); }
.fi-pagination { padding-top: 10px; padding-bottom: 10px; }

/* Sections and forms: one rhythm (16 / 24), titles that read as titles. */
.fi-section-header { padding: 14px 24px; }
.fi-section-header-heading { font-size: 15px; line-height: 24px; font-weight: 600; }
.fi-section-header-description { font-size: 13px; line-height: 20px; color: var(--aya-muted); }
.fi-section-content { padding: 20px 24px; }
.fi-fo-field-wrp-label span { font-size: 13px; line-height: 20px; font-weight: 500; }
.fi-fo-field-wrp-helper-text { font-size: 12px; line-height: 16px; color: var(--aya-muted); }
.fi-fo-field-wrp-error-message { font-size: 12px; line-height: 16px; font-weight: 500; }
.fi-input-wrp { transition: box-shadow .12s ease; }
.fi-fo-repeater-item { border: 1px solid var(--aya-border); border-radius: 8px; }

/* Buttons: press feedback without moving the layout. */
.fi-btn { font-weight: 600; transition: background-color .12s ease, opacity .12s ease, transform .08s ease; }
.fi-btn:active:not(:disabled) { transform: scale(.98); }
.fi-btn:disabled, .fi-btn[disabled] { cursor: progress; }
.fi-badge { font-weight: 500; }

/* Modals and slide-overs: a clear header band, a footer that stays in view. */
.fi-modal-window { box-shadow: 0 16px 40px rgba(24, 24, 27, .16) !important; border: 1px solid var(--aya-border); border-radius: 10px; }
.fi-modal-slide-over-window { border-radius: 0; border-top: 0; border-right: 0; border-bottom: 0; }
.fi-modal-header { padding: 16px 24px; border-bottom: 1px solid var(--aya-border); }
.fi-modal-heading { font-size: 18px; line-height: 28px; font-weight: 600; }
.fi-modal-content { padding: 20px 24px; }
.fi-modal-footer { padding: 14px 24px; border-top: 1px solid var(--aya-border); background-color: var(--aya-bg); }
.fi-modal-close-overlay { background-color: rgba(24, 24, 27, .45) !important; }
/* Sections inside a modal are already framed by the modal. */
.fi-modal-content .fi-section { border: 0; border-radius: 0; background: transparent; }
.fi-modal-content .fi-section .fi-section-content { padding: 0; }
.fi-modal-content .fi-section .fi-section-header { padding: 0 0 12px; }

/* Notifications */
.fi-no-notification { box-shadow: 0 8px 24px rgba(24, 24, 27, .12) !important; border: 1px solid var(--aya-border); border-radius: 8px; }

/* Focus: one visible ring everywhere (keyboard users). */
.fi-btn:focus-visible, .fi-link:focus-visible, .fi-sidebar-item-button:focus-visible, .fi-icon-btn:focus-visible, .fi-dropdown-list-item:focus-visible, .fi-tabs-item:focus-visible {
    outline: 2px solid var(--aya-primary); outline-offset: 2px;
}

/* ---------- Motion: short and purposeful ---------- */
@keyframes aya-fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes aya-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes aya-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* A page's content settles in once, after a page change. */
/* Opacity only: a transform animation here would trap modals and slide-overs inside the page column. */
.fi-main > .fi-page { animation: aya-fade .18s ease-out both; }
.fi-modal-window { animation: aya-fade-up .16s ease-out both; }
.fi-modal-slide-over-window { animation: aya-fade .16s ease-out both; }
.ayapos-kpi, .ayapos-card { transition: border-color .12s ease; }
.ayapos-kpi:hover, .ayapos-card:hover { border-color: #D4D4D8; }

/* ---------- Skeletons ---------- */
/* A flat placeholder block. The sweep is two tones of one grey that only signal "loading". */
.ayapos-skel, [data-aya-busy] .fi-ta-table tbody .fi-ta-cell > *, .ayapos-report.is-loading .ayapos-table td, .ayapos-report.is-loading .ayapos-kpi-value,
.ayapos-dash-body.is-loading .ayapos-kpi-value, .ayapos-dash-body.is-loading .ayapos-rank td, .ayapos-dash-body.is-loading .ayapos-delta, .ayapos-dash-body.is-loading .ayapos-kpi-vs {
    border-radius: 4px; background-color: #EDEDF0;
    background-image: linear-gradient(90deg, #EDEDF0 0%, #F6F6F8 50%, #EDEDF0 100%); background-size: 200% 100%; animation: aya-shimmer 1.2s linear infinite;
}
.ayapos-skel { display: block; }
/* While a table, report or dashboard is fetching, its figures give way to placeholders of the same size. */
[data-aya-busy] .fi-ta-table tbody .fi-ta-cell > *, .ayapos-report.is-loading .ayapos-table td, .ayapos-report.is-loading .ayapos-kpi-value,
.ayapos-dash-body.is-loading .ayapos-kpi-value, .ayapos-dash-body.is-loading .ayapos-rank td, .ayapos-dash-body.is-loading .ayapos-delta, .ayapos-dash-body.is-loading .ayapos-kpi-vs {
    color: transparent !important; background-clip: content-box; pointer-events: none;
}
[data-aya-busy] .fi-ta-table tbody .fi-ta-cell > * * { visibility: hidden; }
.ayapos-report.is-loading .ayapos-table td *, .ayapos-dash-body.is-loading .ayapos-rank td * { visibility: hidden; }
.ayapos-report.is-loading, .ayapos-dash-body.is-loading { opacity: 1; }
.ayapos-report.is-loading .ayapos-bars, .ayapos-dash-body.is-loading .ayapos-chart { opacity: .35; }

/* Going to another page: the content area shows the outline of a page until the new one arrives. */
.ayapos-nav-skel { display: none; }
body.aya-navigating .fi-main > .fi-page { display: none; }
body.aya-navigating .ayapos-nav-skel { display: grid; gap: 24px; padding: 32px 0; animation: aya-fade .12s ease-out both; }
.ayapos-nav-skel .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ayapos-nav-skel .panel { display: grid; gap: 14px; padding: 20px 24px; background: var(--aya-surface); border: 1px solid var(--aya-border); border-radius: 8px; }
.ayapos-nav-skel .line { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 80px; gap: 24px; }
/* The progress line of page changes, in the brand colour. */
#nprogress .bar { background: var(--aya-primary) !important; height: 2px !important; }
#nprogress .peg { box-shadow: none !important; }

@media (max-width: 639px) {
    .fi-section-header { padding: 12px 16px; }
    .fi-section-content, .fi-modal-content { padding: 16px; }
    .fi-modal-header, .fi-modal-footer { padding: 12px 16px; }
    .ayapos-nav-skel .line { grid-template-columns: 2fr 1fr 60px; }
    .ayapos-nav-skel .line span:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .fi-main > .fi-page, .fi-modal-window, .fi-modal-slide-over-window, body.aya-navigating .ayapos-nav-skel { animation: none !important; }
    .ayapos-skel, [data-aya-busy] .fi-ta-table tbody .fi-ta-cell > *, .ayapos-report.is-loading .ayapos-table td, .ayapos-report.is-loading .ayapos-kpi-value,
    .ayapos-dash-body.is-loading .ayapos-kpi-value, .ayapos-dash-body.is-loading .ayapos-rank td, .ayapos-dash-body.is-loading .ayapos-delta, .ayapos-dash-body.is-loading .ayapos-kpi-vs { animation: none !important; background-image: none !important; }
    .fi-btn, .fi-ta-row, .fi-sidebar-item-button { transition: none !important; }
    .fi-btn:active:not(:disabled) { transform: none; }
}
