@import url('/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css');

/* =====================================================================================
   Dropsheep UI — design system on top of Fluent 2 tokens (works in light & dark mode).
   Palette (branding/README.md): six warm neutrals (Fleece, Mist, Stone, Pebble, Slate, Ink), Ink as the accent.
   Fluent writes its tokens on `html` (an adopted stylesheet); the `:root` rules below are more
   specific, so they override the Fluent neutrals and the brand ramp in both themes.
   The theme is read from html[data-theme], kept in sync by the script in App.razor.
   ===================================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-greek.woff2") format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-greek-ext.woff2") format("woff2"); unicode-range: U+1F00-1FFF; }

:root {
    /* Palette (static) */
    --ds-fleece: #FCFCFB;
    --ds-mist: #EDECEA;
    --ds-stone: #D2D1D3;
    --ds-pebble: #A59D99;
    --ds-slate: #57514E;
    --ds-ink: #1C1A19;
    /* Marketplace identifier hues (channel avatars, landing page channel chips) */
    --ds-skroutz: #F68B24;
    --ds-shopflix: #E4004B;
    --ds-woocommerce: #7F54B3;

    /* Type & shape (Fluent tokens) */
    --fontFamilyBase: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    --borderRadiusMedium: 8px;
    --borderRadiusLarge: 10px;
    --borderRadiusXLarge: 12px;

    /* Layout */
    --ds-header-height: 56px;
    --ds-nav-width: 248px;
    --ds-page-max: 1440px;
    --ds-gap: 16px;
    --ds-radius: 12px;
    --ds-radius-sm: 8px;
    --ds-radius-page: 16px;

    /* Surfaces: the shell (header + navigation) is grey, the page itself is a white card */
    --ds-shell: var(--colorNeutralBackground2);
    --ds-canvas: var(--colorNeutralBackground1);
    --ds-surface: var(--colorNeutralBackground1);
    --ds-surface-alt: var(--colorNeutralBackground3);
    --ds-border: var(--colorNeutralStroke2);
    --ds-border-strong: var(--colorNeutralStroke1);
    --ds-border-subtle: var(--colorNeutralStroke3, var(--colorNeutralStroke2));
    --ds-shadow: 0 1px 2px rgba(26, 26, 27, .05);
    --ds-shadow-hover: 0 4px 12px -2px rgba(26, 26, 27, .10), 0 2px 4px -2px rgba(26, 26, 27, .06);
    --ds-shadow-pop: 0 12px 24px -4px rgba(26, 26, 27, .12), 0 4px 8px -2px rgba(26, 26, 27, .06);

    /* Text */
    --ds-text: var(--colorNeutralForeground1);
    --ds-text-2: var(--colorNeutralForeground2);
    --ds-text-3: var(--colorNeutralForeground3);

    /* Semantic tones: pale fill, hairline border, strong text (status pills, notices) */
    --ds-success-bg: #ECFDF3; --ds-success-fg: #067647; --ds-success-border: #ABEFC6; --ds-success-dot: #17B26A;
    --ds-warning-bg: #FFFAEB; --ds-warning-fg: #B54708; --ds-warning-border: #FEDF89; --ds-warning-dot: #F79009;
    --ds-danger-bg: #FEF3F2;  --ds-danger-fg: #B42318;  --ds-danger-border: #FECDCA;  --ds-danger-dot: #F04438;
    --ds-info-bg: #EFF8FF;    --ds-info-fg: #175CD3;    --ds-info-border: #B2DDFF;    --ds-info-dot: #2E90FA;
    --ds-neutral-bg: var(--colorNeutralBackground3); --ds-neutral-fg: var(--colorNeutralForeground2);
    --ds-neutral-border: var(--colorNeutralStroke2); --ds-neutral-dot: var(--ds-pebble);

    /* ---- Fluent tokens, light ---- */
    --colorNeutralBackground1: #FCFCFB;
    --colorNeutralBackground1Hover: #F5F4F2;
    --colorNeutralBackground1Pressed: #EDECEA;
    --colorNeutralBackground1Selected: #F0EFED;
    --colorNeutralBackground2: #F5F4F2;
    --colorNeutralBackground2Hover: #EDECEA;
    --colorNeutralBackground2Pressed: #E6E4E2;
    --colorNeutralBackground3: #F2F1EF;
    --colorNeutralBackground3Hover: #EDECEA;
    --colorNeutralBackground4: #EDECEA;
    --colorNeutralBackground4Hover: #E6E4E2;
    --colorNeutralBackground5: #E6E4E2;
    --colorNeutralBackground6: #DEDCD9;
    --colorSubtleBackgroundHover: #F0EFED;
    --colorSubtleBackgroundPressed: #EDECEA;
    --colorSubtleBackgroundSelected: #EDECEA;
    --colorNeutralForeground1: #1C1A19;
    --colorNeutralForeground1Hover: #1C1A19;
    --colorNeutralForeground1Pressed: #1C1A19;
    --colorNeutralForeground2: #57514E;
    --colorNeutralForeground2Hover: #1C1A19;
    --colorNeutralForeground2Pressed: #1C1A19;
    --colorNeutralForeground3: #6B6765;
    --colorNeutralForeground4: #8A8481;
    --colorNeutralForegroundDisabled: #A59D99;
    --colorNeutralStroke1: #D2D1D3;
    --colorNeutralStroke1Hover: #BAB7B5;
    --colorNeutralStroke1Pressed: #A59D99;
    --colorNeutralStroke2: #E5E3E0;
    --colorNeutralStroke3: #ECEAE8;
    --colorNeutralStrokeAccessible: #6B6765;
    --colorNeutralForegroundOnBrand: #FCFCFB;
    --colorBrandBackground: #1C1A19;
    --colorBrandBackgroundHover: #343233;
    --colorBrandBackgroundPressed: #000000;
    --colorBrandBackgroundSelected: #343233;
    --colorBrandBackground2: #EDECEA;
    --colorBrandBackground2Hover: #E6E4E2;
    --colorBrandForeground1: #1C1A19;
    --colorBrandForeground2: #57514E;
    --colorBrandForegroundLink: #1C1A19;
    --colorBrandForegroundLinkHover: #000000;
    --colorBrandStroke1: #1C1A19;
    --colorBrandStroke2: #D2D1D3;
    --colorCompoundBrandBackground: #1C1A19;
    --colorCompoundBrandBackgroundHover: #343233;
    --colorCompoundBrandBackgroundPressed: #000000;
    --colorCompoundBrandForeground1: #1C1A19;
    --colorCompoundBrandStroke: #1C1A19;
    --colorCompoundBrandStrokeHover: #343233;
    --colorStrokeFocus2: #1C1A19;
}

/* ---- Fluent tokens and tones, dark ---- */
:root[data-theme="dark"] {
    --colorNeutralBackground1: #1C1A19;
    --colorNeutralBackground1Hover: #232223;
    --colorNeutralBackground1Pressed: #2B2A2B;
    --colorNeutralBackground1Selected: #262526;
    --colorNeutralBackground2: #111112;
    --colorNeutralBackground2Hover: #1C1A19;
    --colorNeutralBackground2Pressed: #222122;
    --colorNeutralBackground3: #222122;
    --colorNeutralBackground3Hover: #2B2A2B;
    --colorNeutralBackground4: #262526;
    --colorNeutralBackground4Hover: #302E2F;
    --colorNeutralBackground5: #302E2F;
    --colorNeutralBackground6: #3A3839;
    --colorSubtleBackgroundHover: #262526;
    --colorSubtleBackgroundPressed: #2B2A2B;
    --colorSubtleBackgroundSelected: #2B2A2B;
    --colorNeutralForeground1: #FCFCFB;
    --colorNeutralForeground1Hover: #FCFCFB;
    --colorNeutralForeground1Pressed: #FCFCFB;
    --colorNeutralForeground2: #D2D1D3;
    --colorNeutralForeground2Hover: #FCFCFB;
    --colorNeutralForeground2Pressed: #FCFCFB;
    --colorNeutralForeground3: #A59D99;
    --colorNeutralForeground4: #8A8481;
    --colorNeutralForegroundDisabled: #6B6765;
    --colorNeutralStroke1: #444142;
    --colorNeutralStroke1Hover: #57514E;
    --colorNeutralStroke1Pressed: #6B6765;
    --colorNeutralStroke2: #2F2D2E;
    --colorNeutralStroke3: #282728;
    --colorNeutralStrokeAccessible: #A59D99;
    --colorNeutralForegroundOnBrand: #1C1A19;
    --colorBrandBackground: #EDECEA;
    --colorBrandBackgroundHover: #FCFCFB;
    --colorBrandBackgroundPressed: #D2D1D3;
    --colorBrandBackgroundSelected: #FCFCFB;
    --colorBrandBackground2: #2B2A2B;
    --colorBrandBackground2Hover: #343233;
    --colorBrandForeground1: #FCFCFB;
    --colorBrandForeground2: #D2D1D3;
    --colorBrandForegroundLink: #EDECEA;
    --colorBrandForegroundLinkHover: #FCFCFB;
    --colorBrandStroke1: #EDECEA;
    --colorBrandStroke2: #444142;
    --colorCompoundBrandBackground: #EDECEA;
    --colorCompoundBrandBackgroundHover: #FCFCFB;
    --colorCompoundBrandBackgroundPressed: #D2D1D3;
    --colorCompoundBrandForeground1: #EDECEA;
    --colorCompoundBrandStroke: #EDECEA;
    --colorCompoundBrandStrokeHover: #FCFCFB;
    --colorStrokeFocus2: #FCFCFB;

    --ds-shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --ds-shadow-hover: 0 4px 12px -2px rgba(0, 0, 0, .5);
    --ds-shadow-pop: 0 12px 24px -4px rgba(0, 0, 0, .6);
    --ds-success-bg: rgba(23, 178, 106, .12); --ds-success-fg: #75E0A7; --ds-success-border: rgba(23, 178, 106, .35);
    --ds-warning-bg: rgba(247, 144, 9, .12);  --ds-warning-fg: #FEC84B; --ds-warning-border: rgba(247, 144, 9, .35);
    --ds-danger-bg: rgba(240, 68, 56, .12);   --ds-danger-fg: #FDA29B; --ds-danger-border: rgba(240, 68, 56, .35);
    --ds-info-bg: rgba(46, 144, 250, .12);    --ds-info-fg: #84CAFF;   --ds-info-border: rgba(46, 144, 250, .35);
}

html, body {
    height: 100%;
    background: var(--ds-shell);
    color: var(--ds-text);
    font-family: var(--fontFamilyBase, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--colorBrandForegroundLink, var(--colorBrandForeground1)); }
code, pre, .mono { font-family: var(--fontFamilyMonospace, Consolas, "Cascadia Mono", monospace); font-size: 12.5px; }

/* ---------- App shell ------------------------------------------------------------- */

.app-shell { height: 100dvh; }

.fluent-layout-item[area="header"].app-header,
fluent-layout-item[area="header"].app-header {
    height: var(--ds-header-height);
    padding: 0 12px 0 8px;
    gap: 6px;
    background: var(--ds-shell);
    box-shadow: none;
    color: var(--ds-text);
}

.app-brand {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 0 10px; height: 40px; border-radius: var(--ds-radius-sm);
    color: var(--ds-text); text-decoration: none;
    font-weight: 600; font-size: 17px; letter-spacing: -.2px; white-space: nowrap;
}
.app-brand:hover { background: var(--colorSubtleBackgroundHover); }
.app-brand img { width: 28px; height: 28px; border-radius: 7px; }

.tenant-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 10px; margin-inline-start: 2px;
    border-radius: 999px; font-size: 12px; font-weight: 500;
    color: var(--ds-text-2);
    background: var(--ds-surface); border: 1px solid var(--ds-border);
    white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}

.header-search { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; padding: 0 16px; }
.header-search form { position: relative; width: min(520px, 100%); }
.header-search input {
    width: 100%; height: 38px; padding: 0 12px 0 38px;
    border-radius: var(--ds-radius-sm); border: 1px solid var(--ds-border-strong);
    background: var(--ds-surface); color: var(--ds-text); box-shadow: var(--ds-shadow);
    font: inherit; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.header-search input::placeholder { color: var(--ds-text-3); }
.header-search input:focus { border-color: var(--colorBrandStroke1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-pebble) 30%, transparent); }
.header-search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; fill: var(--ds-text-3); pointer-events: none; }

.header-actions { display: flex; align-items: center; gap: 2px; }
.header-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 0; border-radius: var(--ds-radius-sm);
    background: transparent; color: var(--ds-text-2); cursor: pointer; text-decoration: none;
}
.header-icon-btn:hover { background: var(--colorSubtleBackgroundHover); color: var(--ds-text); }
.header-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* User menu (works without interactivity: <details>) */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; padding: 4px; border-radius: 50%; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover .avatar { box-shadow: 0 0 0 3px var(--ds-border-strong); }
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--ds-slate); color: var(--ds-fleece);
    font-size: 13px; font-weight: 600; letter-spacing: .3px; user-select: none;
}
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.user-menu-panel {
    position: absolute; right: 0; top: 46px; width: 300px; z-index: 1000;
    background: var(--ds-surface); color: var(--ds-text);
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius); box-shadow: var(--ds-shadow-pop);
    overflow: hidden;
}
.user-menu-head { display: flex; gap: 12px; align-items: center; padding: 16px; }
.user-menu-head .who { min-width: 0; }
.user-menu-head .name { font-weight: 600; }
.user-menu-head .email { font-size: 12px; color: var(--ds-text-3); overflow: hidden; text-overflow: ellipsis; }
.user-menu-list { border-top: 1px solid var(--ds-border); padding: 4px; }
.user-menu-list a, .user-menu-list button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 12px; border: 0; border-radius: var(--ds-radius-sm);
    background: transparent; color: var(--ds-text); font: inherit; font-size: 14px; text-align: left;
    text-decoration: none; cursor: pointer;
}
.user-menu-list a:hover, .user-menu-list button:hover { background: var(--colorSubtleBackgroundHover); }
.user-menu-list svg { width: 18px; height: 18px; fill: var(--ds-text-2); }

/* Navigation rail: sits on the grey shell, no divider */
.fluent-layout-item[area="nav"].app-nav,
fluent-layout-item[area="nav"].app-nav {
    background: var(--ds-shell);
    border-inline-end: 0;
}
#main-menu {
    padding: 4px 8px 16px; height: 100%; display: flex; flex-direction: column; border: 0;
    --nav-bg-color: transparent;
    --nav-bg-color-hover: var(--colorSubtleBackgroundHover);
}
#main-menu .fluent-navitem { color: var(--ds-text-2); border-radius: var(--ds-radius-sm); margin-block: 1px; font-weight: 500; }
#main-menu .fluent-navitem:hover { color: var(--ds-text); }
#main-menu .fluent-navitem.active { background: var(--ds-surface); color: var(--ds-text); font-weight: 600; box-shadow: var(--ds-shadow), 0 0 0 1px var(--ds-border); }
#main-menu .fluent-navitem.active::after { display: none; }
#main-menu .fluent-navsectionheader {
    margin: 18px 0 6px 12px; font-size: 11px; line-height: 16px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; color: var(--ds-text-3);
}
.nav-footer { margin-top: auto; padding: 12px 12px 0; font-size: 12px; color: var(--ds-text-3); }
.nav-count {
    margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: var(--ds-text-2);
    background: var(--ds-surface-alt); border: 1px solid var(--ds-border);
}

/* Content: the page is a white card inset in the grey shell */
.fluent-layout-item[area="content"].app-content,
fluent-layout-item[area="content"].app-content {
    background: var(--ds-canvas);
    margin: 0 12px 12px 0;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius-page);
    box-shadow: var(--ds-shadow);
}
.page { max-width: var(--ds-page-max); margin: 0 auto; padding: 28px 32px 48px; }
@media (max-width: 768px) {
    .page { padding: 16px; }
    .header-search, .tenant-chip { display: none; }
    .fluent-layout-item[area="content"].app-content,
    fluent-layout-item[area="content"].app-content { margin: 0; border-radius: 0; border-inline: 0; border-bottom: 0; }
}

/* ---------- Fluent components: buttons and inputs --------------------------------- */
/* Outer rules beat the components' :host styles; custom properties set on the host reach their shadow DOM. */
fluent-button, fluent-anchor-button { font-weight: 600; }
fluent-button:not([appearance]), fluent-button[appearance="outline"],
fluent-anchor-button:not([appearance]), fluent-anchor-button[appearance="outline"],
fluent-button[appearance="primary"], fluent-anchor-button[appearance="primary"] { box-shadow: var(--ds-shadow); }
/* Inputs: one hairline border all round (Fluent's default is a darker underline) */
fluent-text-input, fluent-textarea, fluent-dropdown, fluent-combobox, fluent-spin-button {
    --colorNeutralStrokeAccessible: var(--colorNeutralStroke1);
    --colorNeutralStrokeAccessibleHover: var(--colorNeutralStroke1Hover);
    --colorNeutralStrokeAccessiblePressed: var(--colorNeutralStroke1Pressed);
}

/* ---------- Page header ----------------------------------------------------------- */

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--ds-text-3); margin-bottom: 6px; }
.breadcrumbs a { color: var(--ds-text-3); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ds-text); text-decoration: underline; }
.breadcrumbs .sep { opacity: .6; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-icon {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--ds-surface); color: var(--ds-text-2);
    border: 1px solid var(--ds-border); box-shadow: var(--ds-shadow);
}
.page-icon svg { width: 22px; height: 22px; fill: currentColor; }
.page-icon img { width: 42px; height: 42px; object-fit: cover; border-radius: 9px; }
.page-title { margin: 0; font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -.5px; overflow: hidden; text-overflow: ellipsis; }
.page-subtitle { margin: 4px 0 0; font-size: 15px; color: var(--ds-text-3); }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Surfaces -------------------------------------------------------------- */

.surface {
    background: var(--ds-surface);
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow);
    margin-bottom: var(--ds-gap);
    min-width: 0;
}
.surface-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--ds-border-subtle);
}
.surface-title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.1px; }
.surface-subtitle { margin: 2px 0 0; font-size: 13px; color: var(--ds-text-3); }
.surface-body { padding: 20px; }
.surface-body.flush { padding: 0; }
.surface-footer { padding: 12px 20px; border-top: 1px solid var(--ds-border-subtle); }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--ds-border-subtle); }
.toolbar .spacer { flex: 1; }
.toolbar .count { font-size: 13px; color: var(--ds-text-3); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--ds-gap); align-items: start; }
.grid-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-gap); align-items: start; }
@media (max-width: 1100px) { .grid-2, .grid-2-even { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- KPI tiles ------------------------------------------------------------- */

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--ds-gap); margin-bottom: var(--ds-gap); }
.kpi {
    display: flex; gap: 14px; align-items: center; padding: 16px 18px;
    background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: var(--ds-radius);
    box-shadow: var(--ds-shadow); color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
a.kpi:hover { box-shadow: var(--ds-shadow-hover); transform: translateY(-1px); }
.kpi-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; }
.kpi-icon svg { width: 20px; height: 20px; fill: currentColor; }
.kpi-value { font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 13px; color: var(--ds-text-3); }
.tone-brand, .tone-neutral { background: var(--ds-surface); color: var(--ds-text-2); border-color: var(--ds-border) !important; box-shadow: var(--ds-shadow); }
.tone-success { background: var(--ds-success-bg); color: var(--ds-success-fg); border-color: var(--ds-success-border) !important; }
.tone-warning { background: var(--ds-warning-bg); color: var(--ds-warning-fg); border-color: var(--ds-warning-border) !important; }
.tone-danger { background: var(--ds-danger-bg); color: var(--ds-danger-fg); border-color: var(--ds-danger-border) !important; }
.kpi.attention { border-color: var(--ds-warning-border); background: color-mix(in srgb, var(--ds-warning-bg) 55%, var(--ds-surface)); }

/* ---------- Pills (status) -------------------------------------------------------- */

.pill {
    display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
    border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
    border: 1px solid transparent;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.pill.success { background: var(--ds-success-bg); color: var(--ds-success-fg); border-color: var(--ds-success-border); } .pill.success .dot { background: var(--ds-success-dot); }
.pill.warning { background: var(--ds-warning-bg); color: var(--ds-warning-fg); border-color: var(--ds-warning-border); } .pill.warning .dot { background: var(--ds-warning-dot); }
.pill.danger { background: var(--ds-danger-bg); color: var(--ds-danger-fg); border-color: var(--ds-danger-border); } .pill.danger .dot { background: var(--ds-danger-dot); }
.pill.info { background: var(--ds-info-bg); color: var(--ds-info-fg); border-color: var(--ds-info-border); } .pill.info .dot { background: var(--ds-info-dot); }
.pill.neutral { background: var(--ds-neutral-bg); color: var(--ds-neutral-fg); border-color: var(--ds-neutral-border); } .pill.neutral .dot { background: var(--ds-neutral-dot); }
.pill.running .dot { animation: ds-pulse 1.2s infinite; }
@keyframes ds-pulse { 50% { opacity: .25; } }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--ds-surface); border: 1px solid var(--ds-border); color: var(--ds-text-2); }

/* ---------- Tables ---------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
    position: sticky; top: 0; z-index: 1; text-align: start; white-space: nowrap;
    padding: 11px 16px; font-size: 12px; font-weight: 500; color: var(--ds-text-3);
    background: var(--ds-surface-alt); border-bottom: 1px solid var(--ds-border);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--ds-border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--colorSubtleBackgroundHover); }
.table.clickable tbody tr { cursor: pointer; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; }
.table .muted, .muted { color: var(--ds-text-3); }
.table .strong { font-weight: 600; }
.table.fields td:first-child { width: 180px; font-weight: 600; color: var(--ds-text-2); }
.table.compare td.val { white-space: pre-wrap; word-break: break-word; max-width: 460px; }
.table.rules { min-width: 1400px; }
.table.rules td { padding: 8px 8px; }
.table.rules td:nth-child(2) { min-width: 240px; }
.table.rules td:nth-child(6) { min-width: 200px; }
.table.rules td:last-child { white-space: nowrap; }
.ellipsis { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.small { font-size: 12px; }
.error { color: var(--ds-danger-fg); }

/* Fluent data grid in a surface: same header band and hairlines as .table (selectors outrank Fluent's scoped CSS) */
.surface fluent-data-grid, .surface .fluent-data-grid { border: 0; }
.page .fluent-data-grid th[cell-type="columnheader"][col-index] {
    background: var(--ds-surface-alt); color: var(--ds-text-3); font-size: 12px; height: 44px !important;
    border-bottom: 1px solid var(--ds-border);
}
.page .fluent-data-grid th[cell-type="columnheader"] [col-title-text] { font-weight: 500; }
.page .fluent-data-grid td[col-index] { border-bottom: 1px solid var(--ds-border); }
.grid-wrap { overflow-x: auto; }
.pager { padding: 8px 16px; border-top: 1px solid var(--ds-border-subtle); }

.thumb { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; background: var(--ds-surface-alt); border: 1px solid var(--ds-border-subtle); display: block; }
.thumb.empty { display: inline-flex; align-items: center; justify-content: center; color: var(--ds-text-3); }
.thumb.empty svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Empty state ----------------------------------------------------------- */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; }
.empty-icon { width: 52px; height: 52px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--ds-surface); color: var(--ds-text-2); border: 1px solid var(--ds-border); box-shadow: var(--ds-shadow); margin-bottom: 8px; }
.empty-icon svg { width: 28px; height: 28px; fill: currentColor; }
.empty h3 { margin: 0; font-size: 16px; font-weight: 600; }
.empty p { margin: 0; max-width: 460px; color: var(--ds-text-3); font-size: 14px; }

/* ---------- Dashboard ------------------------------------------------------------- */

.hello { margin-bottom: 20px; }
.hello h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -.3px; }
.hello p { margin: 4px 0 0; color: var(--ds-text-3); }

.checklist { list-style: none; margin: 0; padding: 4px 0; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 20px; }
.checklist li + li { border-top: 1px solid var(--ds-border-subtle); }
.check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ds-border); display: inline-flex; align-items: center; justify-content: center; }
.check.done { border-color: var(--ds-success-dot); background: var(--ds-success-dot); color: #fff; }
.check.done svg { width: 14px; height: 14px; fill: currentColor; }
.checklist .label { flex: 1; }
.checklist .label.done { color: var(--ds-text-3); text-decoration: line-through; }
.progress-track { height: 6px; border-radius: 3px; background: var(--ds-surface-alt); overflow: hidden; }
.progress-fill { height: 100%; background: var(--colorBrandBackground); border-radius: 3px; }

.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; }
.feed-list li + li { border-top: 1px solid var(--ds-border-subtle); }
.channel-logo { flex: none; width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; }
.channel-logo.Skroutz { background: var(--ds-skroutz); }
.channel-logo.Shopflix { background: var(--ds-shopflix); }
.channel-logo.WooCommerce { background: var(--ds-woocommerce); }
.channel-logo.DropsheepXml { background: var(--ds-ink); }
:root[data-theme="dark"] .channel-logo.DropsheepXml { background: var(--ds-slate); }

/* ---------- Detail views ---------------------------------------------------------- */

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1px; background: var(--ds-border-subtle); border-radius: var(--ds-radius); overflow: hidden; border: 1px solid var(--ds-border-subtle); margin-bottom: var(--ds-gap); }
.fact { background: var(--ds-surface); padding: 12px 16px; }
.fact .k { font-size: 12px; color: var(--ds-text-3); }
.fact .v { font-size: 16px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tabs-surface fluent-tabs, .tabs-surface .fluent-tabs { padding: 0 12px; }
.tab-body { padding: 16px 20px 20px; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.image-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--ds-border-subtle); border-radius: var(--ds-radius); background: var(--ds-surface); }
.image-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--ds-surface-alt); border-radius: 6px; }

.image-actions { gap: 0; margin-top: -2px; flex-wrap: wrap; }

/* ---------- Manual products: file picker, attributes, form helpers ---------------------- */

.file-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px; text-align: center; border: 1px dashed var(--ds-border-strong); border-radius: var(--ds-radius); background: var(--ds-surface-alt); color: var(--ds-text-2); transition: background .15s, border-color .15s; }
.file-drop:hover, .file-drop:focus-within { background: var(--colorNeutralBackground1Hover); border-color: var(--colorBrandStroke1); }
.file-drop.busy { opacity: .6; }
.file-drop-icon svg { width: 24px; height: 24px; fill: currentColor; }
.file-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop input[type="file"]:disabled { cursor: default; }

.picked-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.picked-list li { display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 12px; border: 1px solid var(--ds-border-subtle); border-radius: var(--ds-radius-sm); background: var(--ds-surface); }
.picked-list li .ellipsis { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.attr-editor { display: flex; flex-direction: column; gap: 8px; }
.attr-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto; gap: 8px; align-items: center; }
.attr-actions { display: inline-flex; }
@media (max-width: 640px) { .attr-row { grid-template-columns: 1fr auto; } .attr-row > :nth-child(2) { grid-column: 1; } .attr-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; } }

.issue-list { margin: 0; padding-left: 18px; }
.req { color: var(--ds-danger-fg); }
.mb { margin-bottom: var(--ds-gap); }
pre.raw { max-height: 380px; overflow: auto; margin: 8px 0 0; background: var(--ds-surface-alt); padding: 12px; border-radius: var(--ds-radius-sm); }

.source-card { border: 1px solid var(--ds-border-subtle); border-radius: var(--ds-radius); padding: 14px 16px; margin-bottom: 12px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--ds-text-2); padding: 12px 20px; border-bottom: 1px solid var(--ds-border-subtle); }
.diff-row-Conflict { background: color-mix(in srgb, var(--ds-warning-bg) 60%, transparent); }
.diff-row-Fill { background: color-mix(in srgb, var(--ds-success-bg) 60%, transparent); }
.match-banner { display: flex; gap: 16px; align-items: center; padding: 16px 20px; }
.match-side { flex: 1; min-width: 0; }
.match-side .who { font-size: 12px; color: var(--ds-text-3); }
.match-side .what { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-vs { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ds-surface-alt); display: inline-flex; align-items: center; justify-content: center; color: var(--ds-text-3); }
.match-vs svg { width: 18px; height: 18px; fill: currentColor; }

.copy-field { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 6px 6px 12px; border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm); background: var(--ds-surface-alt); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
code.secret { display: block; word-break: break-all; padding: 8px 12px; background: var(--ds-surface-alt); border-radius: var(--ds-radius-sm); margin-top: 6px; }

.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: var(--ds-gap); }
@media (max-width: 560px) { .channel-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.help { font-size: 13px; color: var(--ds-text-3); line-height: 1.5; }
.help code { background: var(--ds-surface-alt); padding: 1px 5px; border-radius: 3px; }

/* ---------- Auth (sign-in) -------------------------------------------------------- */

.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); background: var(--ds-surface); }
.auth-hero {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
    padding: 40px 56px; color: #fff;
    background:
        radial-gradient(1200px 600px at -10% -20%, rgba(168, 160, 157, .22), transparent 60%),
        radial-gradient(900px 600px at 110% 120%, rgba(85, 82, 82, .45), transparent 60%),
        linear-gradient(135deg, #2B2A2B 0%, #1C1A19 55%, #111112 100%);
}
.auth-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
    background-image: linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
    background-size: 48px 48px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 600; position: relative; z-index: 1; }
.auth-brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.auth-pitch { position: relative; z-index: 1; max-width: 560px; }
.auth-pitch h2 { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -.6px; margin: 0 0 16px; }
.auth-pitch p { font-size: 17px; line-height: 26px; opacity: .9; margin: 0 0 28px; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 22px; }
.auth-points .bullet { flex: none; width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.16); display: inline-flex; align-items: center; justify-content: center; }
.auth-points .bullet svg { width: 16px; height: 16px; fill: #fff; }
.auth-foot { position: relative; z-index: 1; font-size: 12px; opacity: .75; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 48px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; line-height: 36px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.3px; }
.auth-card .lead { color: var(--ds-text-3); margin: 0 0 24px; }
.auth-card .links { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; font-size: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ds-text-3); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--ds-border); }
.auth-mobile-brand { display: none; }
.btn-provider {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 40px; box-shadow: var(--ds-shadow);
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius-sm); background: var(--ds-surface); color: var(--ds-text);
    font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.btn-provider:hover { background: var(--colorSubtleBackgroundHover); }
.btn-provider svg { width: 18px; height: 18px; }
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; margin-bottom: 24px; }
    .auth-mobile-brand img { width: 32px; height: 32px; border-radius: 8px; }
}
.validation-message, .text-danger { color: var(--ds-danger-fg); font-size: 13px; }

/* Account management */
.manage { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--ds-gap); align-items: start; }
@media (max-width: 900px) { .manage { grid-template-columns: 1fr; } }

/* ---------- Blazor plumbing ------------------------------------------------------- */

#blazor-error-ui {
    display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2000;
    max-width: 560px; width: calc(100% - 32px); padding: 12px 40px 12px 16px;
    border-radius: var(--ds-radius); box-shadow: var(--shadow16);
    background: var(--ds-danger-bg); color: var(--ds-danger-fg); border: 1px solid var(--ds-danger-dot);
}
#blazor-error-ui .reload { font-weight: 600; margin-inline-start: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 14px; top: 10px; }

.blazor-error-boundary { background: #b32121; padding: 1rem 1rem 1rem 1.5rem; color: white; border-radius: var(--ds-radius); }
.blazor-error-boundary::after { content: "An error has occurred." }

/* ---------- Polish ---------------------------------------------------------------- */
/* The header must not clip the user-menu dropdown. */
.fluent-layout-item[area="header"].app-header, fluent-layout-item[area="header"].app-header { overflow: visible !important; }

/* Fluent fields ship with 12px vertical margins; inside our grids/tables the grid gap does the spacing. */
.form-grid fluent-field, .stack fluent-field, .table fluent-field, .toolbar fluent-field, .row fluent-field { margin-block: 0 !important; }
.form-grid { gap: 16px 16px; }

.table a { text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table td.decision { white-space: nowrap; width: 160px; }

.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.checklist .label.done { text-decoration: none; }

/* Rule sentences */
.rule-sentence { font-size: 14px; line-height: 22px; }
.rule-sentence .kw { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; background: var(--ds-surface-alt); font-weight: 600; margin: 0 2px; }
.rule-sentence .act { background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); }
.rule-sentence .ex { background: var(--ds-danger-bg); color: var(--ds-danger-fg); }
.order-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 24px; border-radius: 12px; background: var(--ds-surface-alt); font-size: 12px; font-weight: 600; color: var(--ds-text-2); font-variant-numeric: tabular-nums; }
tr.is-editing { background: var(--colorBrandBackground2) !important; }
tr.is-disabled td { opacity: .55; }
.grid-2 > *, .grid-2-even > *, .channel-grid > * { min-width: 0; }
.header-actions { margin-inline-start: auto; }
.kpi { gap: 12px; padding: 14px 16px; }
.kpi-icon { width: 36px; height: 36px; }
.kpi-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi > span:last-child { min-width: 0; }
@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .page-header { align-items: flex-start; }
    .hello h1 { font-size: 24px; line-height: 30px; }
}
.surface-header > .row { flex: none; flex-wrap: nowrap; }
.surface-header fluent-anchor-button, .surface-header fluent-button { white-space: nowrap; }

/* Wordmark: lower-case "drop" + Pebble "sheep" */
.wordmark { letter-spacing: -.3px; }
.wordmark > span { color: var(--ds-pebble); }

/* ---------- Language menu --------------------------------------------------------- */
.lang-menu { position: relative; }
.lang-menu > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--ds-radius-sm);
    color: var(--ds-text-2);
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { background: var(--colorSubtleBackgroundHover); color: var(--ds-text); }
.lang-menu > summary svg { width: 20px; height: 20px; fill: currentColor; }
.lang-menu.compact > summary { color: var(--ds-text-2); border: 1px solid var(--ds-border); height: 32px; font-size: 13px; }
.lang-menu.compact > summary:hover { background: var(--colorSubtleBackgroundHover); }
.lang-menu-panel {
    position: absolute; right: 0; top: 46px; min-width: 200px; z-index: 1000; padding: 4px;
    background: var(--ds-surface); color: var(--ds-text);
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius); box-shadow: var(--ds-shadow-pop);
}
.lang-menu.compact .lang-menu-panel { top: 38px; }
.lang-menu-panel a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--ds-radius-sm);
    color: var(--ds-text); text-decoration: none; font-size: 14px;
}
.lang-menu-panel a:hover { background: var(--colorSubtleBackgroundHover); }
.lang-menu-panel a.active { font-weight: 600; }
.lang-menu-panel .check { width: 16px; display: inline-flex; color: var(--colorBrandForeground1); }
.lang-menu-panel .check svg { width: 16px; height: 16px; fill: currentColor; }
.lang-menu-panel .code { margin-inline-start: auto; font-size: 11px; color: var(--ds-text-3); }
.auth-panel { position: relative; }
.auth-lang { position: absolute; top: 20px; right: 24px; }

/* ---------- Review: pick a value per field ----------------------------------------- */
.table.picker td { vertical-align: top; }
.table.picker td.pick-cell { padding: 6px 8px; }
.pick {
    display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 40px; padding: 8px 10px; text-align: start;
    border: 1px solid var(--ds-border); border-radius: var(--ds-radius); background: var(--ds-surface);
    color: var(--ds-text); font: inherit; font-size: 14px; cursor: pointer;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
.pick:hover:not(:disabled) { border-color: var(--colorBrandStroke1); background: var(--colorSubtleBackgroundHover); }
.pick:disabled { cursor: default; opacity: .75; }
.pick.selected {
    border-color: var(--colorBrandStroke1); background: var(--colorBrandBackground2);
    box-shadow: 0 0 0 1px var(--colorBrandStroke1) inset;
}
.pick-mark {
    flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
    border: 1.5px solid var(--ds-border); display: inline-flex; align-items: center; justify-content: center;
}
.pick.selected .pick-mark { background: var(--colorBrandBackground); border-color: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); }
.pick-mark svg { width: 12px; height: 12px; fill: currentColor; }
.pick-val { white-space: pre-wrap; word-break: break-word; }
.pick-none { display: block; padding: 10px; font-size: 13px; }
td.pick-cell.custom.selected fluent-text-input, td.pick-cell.custom.selected fluent-text-area {
    outline: 2px solid var(--colorBrandStroke1); outline-offset: 1px; border-radius: var(--ds-radius-sm);
}

/* Longer languages (e.g. Greek): let KPI labels wrap to two lines instead of truncating */
.kpi-label { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
td.pick-cell.custom.selected { background: var(--colorBrandBackground2); box-shadow: 0 0 0 2px var(--colorBrandStroke1) inset; border-radius: var(--ds-radius); }

/* ---------- Plans & usage --------------------------------------------------------- */
.meter-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 14px; }
.meter-label { font-weight: 600; }
.meter-value { font-variant-numeric: tabular-nums; }
.meter-track { height: 8px; border-radius: 4px; background: var(--ds-surface-alt); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 4px; background: var(--colorBrandBackground); transition: width .3s; }
.meter.warn .meter-fill { background: var(--ds-warning-dot); }
.meter.full .meter-fill { background: var(--ds-danger-dot); }
.meter.full .meter-value { color: var(--ds-danger-fg); font-weight: 600; }

.plan-card { display: flex; flex-direction: column; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--ds-border-subtle); }
.plan-name { font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -.3px; }
.feature-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.feature-list li { display: flex; align-items: center; gap: 8px; }
.feature-list li svg { width: 16px; height: 16px; fill: currentColor; }
.feature-list li.on svg { color: var(--ds-success-dot); }
.feature-list li.off { color: var(--ds-text-3); }

.table.plans th.current, .table.plans td.current { background: color-mix(in srgb, var(--colorBrandBackground2) 70%, transparent); }
.table.plans td:first-child { font-weight: 600; color: var(--ds-text-2); }

/* Admin */
.tier-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid transparent; }
.tier-pill.Free { background: var(--ds-neutral-bg); color: var(--ds-neutral-fg); border-color: var(--ds-neutral-border); }
.tier-pill.Starter { background: var(--ds-info-bg); color: var(--ds-info-fg); border-color: var(--ds-info-border); }
.tier-pill.Professional { background: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); }
.tier-pill.Unlimited { background: var(--ds-surface); color: var(--ds-text); border-color: var(--colorBrandStroke1); }
.mini-meter { width: 110px; }
.mini-meter .meter-label { display: none; }
.mini-meter .meter-value { white-space: nowrap; margin-inline-start: auto; }
.mini-meter .meter-head { font-size: 12px; margin-bottom: 3px; }
.mini-meter .meter-track { height: 5px; }

/* Filter chips (admin customers) */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--colorNeutralStroke1); background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: var(--ds-shadow); }
.chip:hover { background: var(--colorNeutralBackground1Hover); color: var(--colorNeutralForeground1); }
.chip.on { border-color: var(--colorBrandBackground); background: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); font-weight: 600; }
.addon-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--colorNeutralForeground3); }
.kv dd { margin: 0; text-align: end; }

/* Authenticator QR code: always dark modules on white, also in dark mode */
.qr-code { display: inline-block; padding: 8px; margin: 8px 0 4px; background: #fff; border-radius: var(--ds-radius, 8px); border: 1px solid var(--colorNeutralStroke2); line-height: 0; }
.qr-code svg { width: 180px; height: 180px; }

/* Images & storage */
.image-placeholder { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--ds-surface-alt); border-radius: 6px; color: var(--ds-text-muted, inherit); opacity: .7; }
.image-placeholder svg { width: 40px; height: 40px; }
.shared-note { background: var(--ds-info-bg); color: var(--ds-info-fg); border-radius: 6px; padding: 6px 8px; line-height: 1.35; }
.warning-text { color: var(--ds-warning-fg, var(--colorPaletteDarkOrangeForeground1)); }
.plan-notes { padding: 12px 20px 16px; font-size: 12px; color: var(--ds-text-muted, inherit); border-top: 1px solid var(--ds-border-subtle); }
.plan-notes p { margin: 4px 0; }
.limit-field .help { margin-top: 4px; }
.limit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px 24px; }
.field-error { color: var(--ds-danger-fg); font-size: 12px; margin-top: 4px; }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* First paint: the palette tokens above apply before Fluent UI's JS runs (html[data-theme] is set by the
   inline script in App.razor), so a reload never flashes the wrong theme. Type tokens Fluent adds later: */
:root {
    --fontSizeBase300: 14px;
    --lineHeightBase300: 20px;
    --fontWeightRegular: 400;
}

/* Admin: plans & prices editor */
.plan-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--ds-gap); align-items: start; }
.plan-edit-grid > * { margin-bottom: 0; }
.table.addon-edit td { vertical-align: top; min-width: 110px; }
.table.addon-edit td:first-child { min-width: 200px; }

/* Language suggestion bar (fixed at the bottom): keep page content clear of it while it's shown.
   --lang-suggest-h is measured by the script in App.razor; :has() drops the padding once the bar is dismissed. */
body:has(.lang-suggest) main.page,
body:has(.lang-suggest) .auth,
body:has(.lang-suggest) .lp {
    padding-bottom: calc(var(--lang-suggest-h, 64px) + 16px);
}

/* Admin: system status (dependency checks) */
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; }
.status-list li + li { border-top: 1px solid var(--ds-border); }
.status-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; }
.status-icon svg { width: 20px; height: 20px; fill: currentColor; }
.status-icon.success { background: var(--ds-success-bg); color: var(--ds-success-fg); border-color: var(--ds-success-border); }
.status-icon.warning { background: var(--ds-warning-bg); color: var(--ds-warning-fg); border-color: var(--ds-warning-border); }
.status-icon.danger { background: var(--ds-danger-bg); color: var(--ds-danger-fg); border-color: var(--ds-danger-border); }
.status-main { flex: 1; min-width: 0; }
.status-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.status-time { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.status-error { display: block; margin-top: 6px; padding: 8px 12px; border-radius: var(--ds-radius-sm); background: var(--ds-danger-bg); color: var(--ds-danger-fg); border: 1px solid var(--ds-danger-border); white-space: pre-wrap; word-break: break-word; }
.status-data { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 10px 0 0; font-size: 13px; }
.status-data dt { color: var(--ds-text-3); }
.status-data dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* Confirmation popup (Shared/ConfirmDialog.razor): bulk and destructive actions, confirm enabled after a countdown */
.confirm-backdrop {
    position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
    background: color-mix(in srgb, var(--ds-ink) 45%, transparent); backdrop-filter: blur(2px);
}
.confirm-dialog {
    width: min(480px, 100%); padding: 22px 24px 18px; border-radius: var(--ds-radius);
    background: var(--ds-surface); color: var(--ds-text); border: 1px solid var(--ds-border); box-shadow: var(--ds-shadow-pop);
}
.confirm-title { margin: 0 0 10px; font-size: 18px; line-height: 26px; font-weight: 600; }
.confirm-body { font-size: 14px; line-height: 1.55; color: var(--ds-text-2); }
.confirm-body p { margin: 0 0 8px; }
.confirm-body .strong { color: var(--ds-text); }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.confirm-wait { margin: 10px 0 0; font-size: 12px; color: var(--ds-text-3); text-align: end; }

/* Bulk selection in tables */
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--ds-border); background: var(--colorBrandBackground2); }
.bulk-bar .spacer { flex: 1; }
.table th.check-col, .table td.check-col { width: 44px; padding-inline-end: 0; cursor: default; }
.row-check { width: 16px; height: 16px; margin: 0; accent-color: var(--colorBrandBackground); cursor: pointer; vertical-align: middle; }
.table tbody tr.is-selected { background: color-mix(in srgb, var(--colorBrandBackground2) 70%, transparent); }
