/* ============================================================================
   theme.css — Tokef · מערכת טפסים ארגונית

   The design of 07/09/2026 (a ChatGPT mockup of the forms screen), adopted as the
   product's identity on 24/11/2026: a navy side menu that carries the lockup on
   top and the vendor at its foot, a white top bar with the breadcrumb, the
   language and the account, and white cards on a light canvas. Replaces the
   OneForm direction of 18/08 (deep blue variation A).

   ── Why this file exists at all ───────────────────────────────────────────
   site.css is the CANONICAL DemoAppCore stylesheet and is synced from there
   byte-for-byte; editing it here would fork the template. So the whole visual
   identity is a LAYER on top of it: the variables it draws from, re-pointed,
   plus the rules where it hard-codes a shape. Loaded last, so equal-specificity
   rules win. The customer's own brand (Code\Branding.cs) is a further layer on
   top of this one and re-points only --accent and its shades.

   ── The layout trick ──────────────────────────────────────────────────────
   The shell's #upperPanel (lockup + vendor) is OUTSIDE the management layout.
   In the layout it becomes the side menu's navy column itself — fixed, full
   height — and #menu is laid over its middle. On the sign-in screen (no layout)
   it stays a top bar. `body:has(#layout)` tells the two apart.
   ========================================================================== */

:root {
    /* ---- surfaces ---- */
    --paper: #ffffff;
    --paper-soft: #f5f7fb;
    --line: #e2e7ef;
    --line-strong: #d3dbe6;
    --canvas: #f4f6fa;

    /* ---- text ---- */
    --ink: #0f1b2d;
    --ink-soft: #5b6678;
    --ink-faint: #8391a7;

    /* the canonical "glass" names, pointed at the light surfaces (site.css reads them) */
    --glass: #ffffff;
    --glass-line: #e2e7ef;
    --glass-ink: #0f1b2d;
    --glass-ink-soft: #5b6678;
    --glass-2: #f5f7fb;
    --glass-3: #edf1f7;

    /* ---- brand ---- */
    --accent: #1765e8;
    --accent-2: #0f54c9;
    --accent-soft: #e8f0fe;
    --accent-grad: linear-gradient(135deg, #1765e8, #3a82f6);

    /* ---- the side menu ---- */
    --side-w: 21rem;
    --navy: #0c1d3a;
    --navy-2: #142a4d;
    --navy-line: rgba(255, 255, 255, 0.12);
    --side-ink: #e3e9f3;
    --side-ink-soft: #8fa1bf;
    --brand-h: 9.6rem;      /* the lockup on top of the side menu */
    --vendor-h: 7rem;       /* the vendor block at its foot */
    --top-h: 6rem;          /* the white top bar */

    --danger: #b42318;
    --ok: #1f8a4c;
    --ok-soft: #e7f6ed;

    --radius: 0.8rem;
    --radius-s: 0.6rem;
    --shadow: 0 0.1rem 0.3rem rgba(15, 27, 45, 0.06), 0 0.8rem 2rem rgba(15, 27, 45, 0.08);
    --shadow-s: 0 0.08rem 0.2rem rgba(15, 27, 45, 0.05);
}

/* ------------------------------------------------------------------ page -- */

body {
    font-family: 'Segoe UI', 'Noto Sans Hebrew', 'Arial Hebrew', Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    background-image: none;
}

#content { min-height: 0; }

/* -------------------------------------------------- the shell bar (sign-in) -- */

#upperPanel {
    background: var(--navy);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    padding: 1rem 2rem;
    color: var(--side-ink);
}

#upperPanel #rightPart {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: #ffffff;
    letter-spacing: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-decoration: none;
}

/* the wordmark is an <img> drawn for the navy column (white letters, blue accents) - shown as it is.
   A customer's own logo set in the settings must be its light version for the same reason. */
#upperPanel #rightPart img { height: 2rem; width: auto; max-width: 100%; display: block; }

/* a customer's name drawn as the lockup (Branding.cs) — empty, and so invisible, otherwise */
#upperPanel #rightPart .brandWord:not(:empty) { display: block; font-size: 2rem; font-weight: 700; line-height: 1.1; }

#upperPanel .brandTag { color: var(--side-ink); font-size: 1.15rem; font-weight: 400; }

#leftPart { color: var(--side-ink); display: flex; align-items: center; gap: 0.9rem; }
#leftPart .vendorText { display: flex; flex-direction: column; line-height: 1.25; }
#leftPart .vendorText small { color: var(--side-ink-soft); font-size: 0.95rem; }
#leftPart .vendorText b { color: #ffffff; font-size: 1.15rem; font-weight: 600; }
#leftPart .vendorMark {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: conic-gradient(from 200deg, #2dd4bf, #60a5fa, #f472b6, #fb923c, #2dd4bf);
    box-shadow: inset 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

#menuToggle { color: #ffffff; }

/* --------------------------------------------- the management layout -- */

/* the shell bar becomes the navy column: lockup on top, vendor at the foot */
body:has(#layout) #upperPanel {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: var(--side-w);
    z-index: 40;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    padding: 2.2rem 1.8rem 1.8rem;
}

body:has(#layout) #leftPart {
    margin-inline-start: 0;
    border-top: 0.08rem solid var(--navy-line);
    padding-top: 1.4rem;
}

#layout { display: block; min-height: 100vh; }

/* the menu entries, laid over the middle of that column */
#menu {
    position: fixed;
    top: var(--brand-h);
    bottom: var(--vendor-h);
    inset-inline-start: 0;
    width: var(--side-w);
    z-index: 41;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 0 1.2rem 0.6rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-start;
}

#menu .buttons { flex: 1; gap: 0.35rem; }

#menu input[type=button] {
    color: var(--side-ink);
    font-size: 1.25rem;
    padding: 0.85rem 3.6rem 0.85rem 1rem;
    border-radius: var(--radius-s);
    border: none;
    background-color: transparent;
    background-position: right 1.1rem center;
    background-size: 1.7rem;
}

[dir="ltr"] #menu input[type=button] { padding: 0.85rem 1rem 0.85rem 3.6rem; background-position: left 1.1rem center; }

#menu input[type=button]:hover { background-color: rgba(255, 255, 255, 0.06); }

#menu input.active,
#menu input.active:hover {
    background-color: var(--accent);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0.3rem 0.9rem rgba(23, 101, 232, 0.35);
}

/* the group captions: muted, with a hairline running to the far edge */
#menu .menuGroup {
    color: var(--side-ink-soft);
    font-size: 1rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.4rem 0.4rem 0.4rem;
    padding: 0;
    border: none;
}

#menu .menuGroup::after { content: ''; flex: 1; height: 0.08rem; background: var(--navy-line); }

/* help, set apart at the foot of the list */
#menu input.menuFoot { margin-top: auto; }

#menu .menuBottom { gap: 0; }
#menu .menuVersion { color: var(--side-ink-soft); text-align: center; }

/* "פרופיל עבודה" — the working profile, a dark select at the head of the menu */
.menuChrome { border: none; padding: 0 0.2rem; margin: 0; }
.menuChrome label { color: var(--side-ink-soft); font-size: 1.05rem; display: block; margin-bottom: 0.5rem; }

#profileSelector {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--navy-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3e9f3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 1rem center / 1.5rem;
    color: #ffffff;
    border: 0.08rem solid var(--navy-line);
    border-radius: var(--radius-s);
    padding: 0.85rem 1.1rem 0.85rem 3rem;
    font-family: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

[dir="ltr"] #profileSelector { background-position: right 1rem center; padding: 0.85rem 3rem 0.85rem 1.1rem; }
#profileSelector:hover { background-color: #1a3359; }
#profileSelector option { background: var(--navy); color: #ffffff; }

/* --- the menu icons: one line drawing per screen, in the menu's own light ink --- */
#menu input#Dashboard { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 20V11M11 20V5M17 20v-7M3 20h18'/%3E%3C/svg%3E"); }
#menu input#Forms { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 13h8M8 17h6'/%3E%3C/svg%3E"); }
#menu input#Reports { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6'/%3E%3C/svg%3E"); }
#menu input#Groups,
#menu input#Users { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.6a3.5 3.5 0 0 1 0 6.8M18 14.2a6.5 6.5 0 0 1 3.5 5.8'/%3E%3C/svg%3E"); }
#menu input#Files { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3a9 9 0 1 0 0 18c1.2 0 1.8-.8 1.8-1.7 0-.5-.2-.9-.5-1.2-.3-.3-.5-.7-.5-1.2 0-.9.8-1.7 1.8-1.7H17a4 4 0 0 0 4-4c0-4.4-4-8.2-9-8.2z'/%3E%3Ccircle cx='7.5' cy='11' r='1'/%3E%3Ccircle cx='10' cy='7' r='1'/%3E%3Ccircle cx='15' cy='7.5' r='1'/%3E%3C/svg%3E"); }
#menu input#ExpirationMessages { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 8 3 8H3s3-1 3-8M10.3 20a1.9 1.9 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
#menu input#DropDowns { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h12M9 12h12M9 18h12M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
#menu input#Dictionary { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2zM22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E"); }
#menu input#Profiles { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
#menu input#SystemSettings { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E"); }
#menu input#Helps { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5deec' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M9.1 9a3 3 0 0 1 5.8 1c0 2-3 3-3 3M12 17h.01'/%3E%3C/svg%3E"); }

/* --------------------------------------------------------- the main column -- */

#main { margin-inline-start: var(--side-w); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }

/* the white top bar: breadcrumb on the start side, language and account on the far side */
#topBar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--top-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 2.8rem;
    background: var(--paper);
    border-bottom: 0.08rem solid var(--line);
}

.crumbsTop { display: flex; align-items: center; gap: 0.7rem; color: var(--ink-soft); font-size: 1.2rem; }
.crumbsTop .crumbSep { color: var(--ink-faint); }
.crumbsTop #crumbScreen { color: var(--accent); font-weight: 600; }
.crumbsTop #crumbScreen:empty, .crumbsTop #crumbScreen:empty ~ * { display: none; }
.crumbsTop .crumbSep:has(+ #crumbScreen:empty) { display: none; }

.topTools { display: flex; align-items: center; gap: 1.8rem; }

/* the language: a globe, the name, a chevron — no box */
#topBar #language {
    appearance: none;
    -webkit-appearance: none;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5a14.5 14.5 0 0 1 0 19M12 2.5a14.5 14.5 0 0 0 0 19'/%3E%3C/svg%3E") no-repeat right 0.2rem center / 1.8rem,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 0.2rem center / 1.3rem;
    border: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 1.2rem;
    padding: 0.5rem 2.8rem 0.5rem 2rem;
    cursor: pointer;
}

[dir="ltr"] #topBar #language {
    background-position: left 0.2rem center, right 0.2rem center;
    padding: 0.5rem 2rem 0.5rem 2.8rem;
}

#topBar #language option { background: var(--paper); color: var(--ink); }

/* the account: avatar, name and role, and its two actions under it */
.userMenu { position: relative; border-inline-start: 0.08rem solid var(--line); padding-inline-start: 1.8rem; }
.userMenu summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    cursor: pointer;
    padding-inline-end: 2rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left center / 1.3rem;
}
[dir="ltr"] .userMenu summary { background-position: right center; }
.userMenu summary::-webkit-details-marker { display: none; }
.userMenu .avatar {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    background: #e9eef6;
    color: var(--ink);
    font-weight: 600;
    font-size: 1.25rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.userMenu .who { display: flex; flex-direction: column; line-height: 1.3; }
.userMenu .menuUser { color: var(--ink); font-size: 1.2rem; font-weight: 600; }
.userMenu .userRole { color: var(--accent); font-size: 1rem; }

.userMenuItems {
    position: absolute;
    top: calc(100% + 0.8rem);
    inset-inline-end: 0;
    min-width: 16rem;
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: var(--radius-s);
    box-shadow: var(--shadow);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    z-index: 60;
}

.userMenuItems input[type=button] {
    font-family: inherit;
    font-size: 1.15rem;
    text-align: start;
    color: var(--ink);
    background: transparent;
    border: none;
    border-radius: 0.4rem;
    padding: 0.7rem 1rem;
    cursor: pointer;
}
.userMenuItems input[type=button]:hover { background: var(--paper-soft); }

/* ------------------------------------------------------------- the screen -- */

/* The screen's head is one row: title and line on the start side, its actions on the far
   side (the design's "+ טופס חדש" / "ייבוא טופס"). Everything else spans the full width. */
#inner {
    flex: 1;
    padding: 2.6rem 2.8rem 3rem;
    margin-inline-end: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 2rem;
    align-content: start;
}

#inner > * { grid-column: 1 / -1; min-width: 0; }
#inner > h1 { grid-column: 1; margin: 0; font-size: 2.7rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
#inner > .screenSub { grid-column: 1; margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 1.2rem; }
#inner > .screenActions { grid-column: 2; grid-row: 1 / span 2; align-self: center; margin: 0; }

.adminWelcome { padding: 6rem 2rem; text-align: center; }
.adminWelcome, .adminWelcome h1 { color: var(--ink); }
.adminWelcome p { color: var(--ink-soft); }

/* the actions of a screen: the primary one at the outer edge, as in the design */
.screenActions { display: flex; flex-direction: row-reverse; gap: 1rem; }

.screenActions input[type=button] {
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.95rem 1.8rem;
    border-radius: var(--radius-s);
    border: 0.08rem solid var(--line-strong);
    background-color: var(--paper);
    color: var(--ink);
    cursor: pointer;
    background-repeat: no-repeat;
    background-size: 1.6rem;
}

.screenActions input[type=button]:hover { background-color: var(--paper-soft); }

.screenActions input[type=button].primaryButton { background-color: var(--accent); border-color: var(--accent); color: #ffffff; }
.screenActions input[type=button].primaryButton:hover { background-color: var(--accent-2); }

/* the two of the forms screen carry their icons */
.screenActions input#NewForm {
    padding-inline-start: 4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
    background-position: right 1.4rem center;
}
.screenActions input#ImportForm {
    padding-inline-start: 4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M7 8l5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E");
    background-position: right 1.4rem center;
}
[dir="ltr"] .screenActions input#NewForm,
[dir="ltr"] .screenActions input#ImportForm { background-position: left 1.4rem center; }

/* --------------------------------------------------------------- tables -- */

/* a table is a white card: its filters, its rows and its pager inside one border */
div.table {
    width: 100%;
    margin: 2rem 0 0;
    padding: 0;
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    overflow: visible;     /* a row's ⋮ menu opens past the card's edge on the last rows */
}

div.table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0; }

/* The canonical sheet scrolls the rows inside a fixed box, with every row its own fixed-layout table
   (equal columns). Here a table is paged instead, so it is an ordinary table again: no inner scroll
   bar, and columns as wide as what they hold (the form name wide, the number narrow). */
@media screen and (min-width: 56.26rem) {
    div.table thead { width: auto; }
    div.table tbody { display: table-row-group; max-height: none; overflow: visible; }
    div.table tr { display: table-row; table-layout: auto; width: auto; }
}

div.table tbody td:first-child { max-width: 48rem; }

div.table thead th {
    background: #f7f9fc;
    color: #334155;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: start;
    padding: 1.2rem 2rem;
    border-bottom: 0.08rem solid var(--line);
}

div.table tbody td {
    padding: 0.95rem 2rem;
    border-bottom: 0.08rem solid #eef1f5;
    font-size: 1.15rem;
    color: var(--ink);
}

div.table tbody tr:last-child td { border-bottom: none; }
div.table tbody tr:hover { background: #f5f8ff; }

th.sort_asc::after, th.sort_desc::after { color: var(--accent); }

/* the filter row, inside the card, above the rows */
.filterBar {
    background: transparent;
    border: none;
    border-bottom: 0.08rem solid var(--line);
    border-radius: 0;
    margin: 0;
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.4rem 1.8rem;
}

.filterBar label { color: var(--ink); font-weight: 600; font-size: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }

.filterBar input[type=text],
.filterBar select {
    height: 3.8rem;
    min-width: 20rem;
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    background-color: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 1.15rem;
    padding: 0 1.2rem;
}

.filterBar select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1.3rem;
    padding-inline-end: 3rem;
}
[dir="ltr"] .filterBar select { background-position: right 1rem center; }

/* the free-text search carries its magnifier */
.filterBar input#search,
.filterBar input#nameFilter {
    padding-inline-start: 3.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238391a7' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 1.6rem;
}
[dir="ltr"] .filterBar input#search,
[dir="ltr"] .filterBar input#nameFilter { background-position: left 1.1rem center; }

/* the table menu (☰) and the add (+) of the canonical table, as quiet square buttons */
div.table svg.menuIcon {
    padding: 0.6rem;
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    background: var(--paper);
    fill: var(--ink);
    cursor: pointer;
}

/* The pager (TableMaker.NumberedPager, built by tablemaker.js): the summary on the start side, the
   page numbers in the middle, the rows-per-page choice on the far side. Square page buttons, the
   current one in the brand colour. */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding: 1.4rem 2rem;
    border-top: 0.08rem solid var(--line);
}

.pager[hidden] { display: none; }

.pager .pagerSummary { color: var(--ink-soft); font-size: 1.1rem; }
.pager .pagerPages { display: flex; align-items: center; gap: 0.6rem; }

.pager span[data-page], .pager .pagerState {
    min-width: 3.6rem;
    height: 3.6rem;
    padding: 0 0.8rem;
    display: inline-grid;
    place-items: center;
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    background: var(--paper);
    color: var(--ink);
    font-size: 1.15rem;
    cursor: pointer;
    user-select: none;
}

.pager span[data-page]:hover { background: var(--paper-soft); }
.pager span.current, .pager span.current:hover,
.pager .pagerState, .pager .pagerState:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; cursor: default; }
.pager span.disabled, .pager span.disabled:hover { background: var(--paper); color: var(--ink-faint); cursor: default; }
.pager span.gap { border: none; background: none; min-width: 1.6rem; padding: 0; color: var(--ink-soft); }
/* the arrows are drawn for a left-to-right page order: mirrored when the page reads from the right */
[dir="rtl"] .pager [data-page=prev], [dir="rtl"] .pager [data-page=next] { transform: scaleX(-1); }

.pager .pagerSize { display: flex; align-items: center; gap: 0.8rem; color: var(--ink-soft); font-size: 1.1rem; }
.pager .pagerSize select {
    height: 3.6rem;
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 1.1rem;
    padding: 0 0.8rem;
}

/* ------------------------------------------------------------ the form list -- */

/* the state tabs, each with its count, and "תפריט טבלה" with the table menu (☰) on the far side */
div.table { position: relative; }

.stateTabs {
    display: flex;
    align-items: stretch;
    gap: 2.4rem;
    padding: 0 2rem;
    border-bottom: 0.08rem solid var(--line);
    min-height: 5.6rem;
}

.stateTab {
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: none;
    border: none;
    border-bottom: 0.25rem solid transparent;
    padding: 0 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.stateTab .count {
    min-width: 3rem;
    padding: 0.2rem 0.8rem;
    border-radius: 1rem;
    background: #eef2f7;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stateTab:hover { color: var(--ink); }
.stateTab.current { color: var(--accent); border-bottom-color: var(--accent); }
.stateTab.current .count { background: var(--accent-soft); color: var(--accent); }

.stateTabs .tableMenuCaption {
    margin-inline-start: auto;
    align-self: center;
    padding-inline-end: 4.4rem;     /* room for the ☰ placed over this corner */
    color: var(--ink-soft);
    font-size: 1.15rem;
    cursor: pointer;
}

#FormsTable > svg.menuIcon {
    position: absolute;
    top: 1rem;
    inset-inline-end: 2rem;
    width: 3.6rem;
    height: 3.6rem;
    padding: 0.9rem;
    z-index: 1;
}

/* "ניקוי סינון" — a link, at the far end of the filter row */
.filterBar .clearFilters {
    margin-inline-start: auto;
    align-self: center;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    padding: 0.5rem 0;
    cursor: pointer;
}
.filterBar .clearFilters:hover { text-decoration: underline; }

/* the state tag of a row: a green dot and "פעיל", or grey "לא פעיל" */
.stateTag {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1.1rem;
    border-radius: 1.4rem;
    font-size: 1.05rem;
    font-weight: 600;
}
.stateTag::before { content: ''; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: currentColor; }
.stateTag.on { background: var(--ok-soft); color: var(--ok); }
.stateTag.off { background: #eef1f5; color: var(--ink-soft); }

/* the row's actions: "עריכה" with its pencil, and ⋮ */
td:has(> .rowEdit) { white-space: nowrap; position: relative; }

.rowEdit {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.1rem;
    padding-inline-start: 2.4rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1b2d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E") no-repeat right center / 1.6rem;
}
[dir="ltr"] .rowEdit { background-position: left center; }
.rowEdit:hover { color: var(--accent); }

.rowMore {
    margin-inline-start: 1.6rem;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--ink);
    background: none;
    border: none;
    border-radius: 0.4rem;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
}
.rowMore:hover { background: var(--paper-soft); }

.rowMenu {
    position: absolute;
    top: 80%;
    inset-inline-end: 1.4rem;
    z-index: 20;
    min-width: 12rem;
    display: flex;
    flex-direction: column;
    padding: 0.4rem;
    background: var(--paper);
    border: 0.08rem solid var(--line);
    border-radius: var(--radius-s);
    box-shadow: var(--shadow);
}
.rowMenu button {
    font-family: inherit;
    font-size: 1.1rem;
    text-align: start;
    color: var(--ink);
    background: none;
    border: none;
    border-radius: 0.4rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
}
.rowMenu button:hover { background: var(--paper-soft); }

/* the form name reads as the row's title */
#FormsTable tbody td:first-child { font-weight: 600; }

/* ---------------------------------------------------- the plain controls -- */

/* Every input, select and button of a screen that no specific rule styles (date pickers, the design
   files' panels, the dashboard's range…) — in the Tokef look. Wrapped in :where(), i.e. specificity
   zero: any rule that does style a control (filter bar, pager, editor, popups) still wins. */
:where(#inner) :where(input[type=text], input[type=number], input[type=email], input[type=password],
                      input[type=date], input[type=datetime-local], input[type=search], select, textarea) {
    font-family: inherit;
    font-size: 1.15rem;
    color: var(--ink);
    background-color: var(--paper);
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    padding: 0.55rem 0.9rem;
    min-height: 3.4rem;
}

:where(#inner) :where(input[type=button], input[type=submit], button) {
    font-family: inherit;
    font-size: 1.15rem;
    color: var(--ink);
    background-color: var(--paper);
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    padding: 0.6rem 1.3rem;
    cursor: pointer;
}

:where(#inner) :where(input[type=button], input[type=submit], button):hover { background-color: var(--paper-soft); }

:where(#inner) input[type=file] { font-family: inherit; font-size: 1.05rem; color: var(--ink-soft); }
:where(#inner) input[type=file]::file-selector-button {
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    background: var(--paper);
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    padding: 0.5rem 1.1rem;
    margin-inline-end: 0.8rem;
    cursor: pointer;
}

:where(#inner) .primaryButton { border-color: var(--accent); padding: 0.6rem 1.4rem; border-radius: var(--radius-s); }

/* a link that acts as a button (exports, downloads) */
a.btnGhost {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.15rem;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-s);
}

/* ------------------------------------------------------------- controls -- */

/* ⚠ specificity: `input[type=button]` inside a container is (0,2,1) and beats a bare class —
   every rule below that must win against one names the attribute too. */
.btnPrimary,
.addButton,
#formDiv input[type=button],
.pageForm input[type=button],
.primaryButton {
    background: var(--accent);
    color: #ffffff;
    box-shadow: none;
}

.btnPrimary:hover,
#formDiv input[type=button]:hover,
.pageForm input[type=button]:hover,
.primaryButton:hover { background: var(--accent-2); transform: none; }

.addButton { box-shadow: var(--shadow-s); border-radius: var(--radius-s); }
.addButton:hover { background: var(--accent-2); }

#formDiv input[type=button][value='ביטול'],
.pageForm input[type=button][value='ביטול'] { background: var(--paper-soft); color: var(--ink-soft); }

#formDiv input[type=button][value='מחיקה'],
.pageForm input[type=button][value='מחיקה'],
input[type=button].dangerButton,
.dangerButton { background: #fdecea; color: var(--danger); }

input[type=button].dangerButton:hover,
.dangerButton:hover { background: #fbd9d5; }

.btnGhost { background: var(--paper); color: var(--accent); border: 0.08rem solid var(--line); }
.btnGhost:hover { background: var(--accent-soft); }

/* a visible focus ring in the brand colour (WCAG AA) — through a variable with a fallback, so a
   customer brand colour carries into it (Branding.cs emits --accent-ring) */
.filterBar input[type=text]:focus, .filterBar select:focus,
#formDiv input:focus, #formDiv select:focus, #formDiv textarea:focus,
.pageForm input:focus, .pageForm select:focus, .pageForm textarea:focus,
#profileSelector:focus-visible, #topBar #language:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 0.22rem var(--accent-ring, rgba(23, 101, 232, 0.2));
}

.checkRow input { accent-color: var(--accent); }

/* ------------------------------------------------------------- overlays -- */

/* The side column and the top bar are positioned with a z-index now, so the popups — which used
   to stack by DOM order alone — get one above both; among themselves DOM order still decides. */
.overlay, .popupPanel, #formDiv { z-index: 200; }
.editorOverlay { z-index: 190; }
.overlay { background: rgba(12, 29, 58, 0.45); }
#formDiv, .popupPanel { border: 0.08rem solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* --------------------------------------------------------------- editor -- */

/* the editor wants the height that the top bar and the pane's padding leave */
.editorScreen { height: calc(100vh - var(--top-h) - 5.6rem); }

.editorBar input[type=button],
.editorBar a.btnGhost,
.stepBar input[type=button],
.canvasBar input[type=button] {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--ink);
    background: var(--paper);
    border: 0.08rem solid var(--line-strong);
    border-radius: var(--radius-s);
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.editorBar input[type=button]:hover,
.editorBar a.btnGhost:hover,
.stepBar input[type=button]:hover,
.canvasBar input[type=button]:hover { background: var(--accent-soft); border-color: var(--accent); }

.editorBar input[type=button].primaryButton,
.editorBar input[type=button].primaryButton:hover,
.overlayFoot input[type=button].primaryButton {
    background: var(--accent);
    color: #ffffff;
    border-color: transparent;
}

.editorBar input[type=button].dangerButton { background: #fdecea; color: var(--danger); border-color: transparent; }

.stepTab.active { background: var(--accent-soft); color: var(--accent); border-color: var(--line); }
.panelTab.active { box-shadow: inset 0 -0.18rem 0 var(--accent); color: var(--accent); }
.paletteItem { background: var(--paper); }
.paletteItem:hover { background: var(--accent-soft); border-color: var(--accent); }
.codeTab.active, .previewTab.active { background: var(--accent); }
.overlayCard { border: 0.08rem solid var(--line); box-shadow: var(--shadow); }

/* ------------------------------------------------------------ machine text -- */

.panelId, .crumbs, .attrName, .ssoAccount, .jsonText, .versionList,
.contentText, .sections textarea, .staticLinkRow a {
    font-family: Consolas, 'Cascadia Mono', 'Courier New', monospace;
}

/* ------------------------------------------------------------ responsive -- */

/* A narrow window: the column folds back into a top bar and the menu becomes the canonical
   drawer (site.css), in the menu's navy. */
@media (max-width: 56.25rem) {
    body:has(#layout) #upperPanel {
        position: sticky;
        top: 0;
        bottom: auto;
        width: auto;
        flex-direction: row;
        align-items: center;
        padding: 1rem 1.4rem;
    }
    body:has(#layout) #leftPart { display: none; }
    #upperPanel .brandTag { display: none; }
    #menu {
        top: 0;
        bottom: 0;
        width: 70vw;
        inset-inline-start: -75vw;
        background: var(--navy);
        padding-top: 2rem;
        z-index: 80;
    }
    body.menu-open #menu { inset-inline-start: 0; }
    #main { margin-inline-start: 0; }
    #topBar { position: static; padding: 0 1.2rem; }
    .crumbsTop { display: none; }
    #inner { padding: 1.4rem; grid-template-columns: minmax(0, 1fr); }
    #inner > .screenActions { grid-column: 1; grid-row: auto; margin-top: 1rem; }
}

@media print {
    #topBar { display: none; }
    #main { margin: 0; }
}
