/* ==========================================================================
   REDESIGN - shared design system for the new interface.

   Loaded only by the demo pages (through DemoShell), so nothing here can
   reach an existing page. Everything is scoped under .rd (the page) or
   .rd-dlg (a Syncfusion dialog, in case it renders outside the page).

   SIZES were taken from the owner's reference screenshots on a 27" screen:
   13px body and table text, 34px rows and controls, 20px page title.
   Change a size here once and every screen follows.

   COLOURS come from the "שמחת חיים" logo - dark brown lettering, a tan
   frame, a warm off-white ground - with a muted blue added for actions,
   as the owner asked: brown, beige and blue together.
   ========================================================================== */

.rd,
.rd-dlg {
    /* ---------- type ---------- */
    --f: "Heebo", "Segoe UI", Arial, sans-serif;
    --fs-xs: 11px;      /* badges, pills */
    --fs-sm: 12px;      /* secondary text, table headers, labels */
    --fs-md: 13px;      /* body and table text */
    --fs-lg: 14px;      /* menu, card titles */
    --fs-h2: 15px;      /* panel titles */
    --fs-h1: 20px;      /* page title */
    --fs-num: 26px;     /* the big figure on a summary tile */

    /* ---------- rhythm ---------- */
    --row-h: 34px;
    --ctl-h: 34px;
    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;

    /* ---------- brown - taken from the logo lettering ---------- */
    --brown-900: #3B2A1F;
    --brown-800: #4A3427;
    --brown-700: #5A3E2B;
    --brown-500: #85664C;
    --brown-100: #EFE6DC;

    /* ---------- tan / gold - taken from the logo frame ---------- */
    --tan-700: #8C7148;
    --tan-500: #B39A6B;
    --tan-300: #D2BFA0;
    --tan-100: #F4EDE0;

    /* ---------- beige - the logo ground ---------- */
    --beige-200: #E8E3D9;
    --beige-100: #F0EEE9;
    --beige-50: #F8F6F2;

    /* ---------- blue - actions and information ---------- */
    --blue-800: #213E59;
    --blue-700: #2C5275;
    --blue-600: #3A6A93;
    --blue-100: #E1EAF2;
    --blue-50: #F0F5F9;

    /* ---------- ink and lines, warm rather than grey ---------- */
    --ink: #2B2420;
    --ink-2: #5A5149;
    --ink-3: #7A7066;
    --line: #E6E0D5;
    --line-2: #D5CBBB;
    --surface: #FFFFFF;
    --page: #F6F3EE;

    /* ---------- status ---------- */
    --ok: #3A7550;     --ok-bg: #E5F0E8;
    --warn: #9C6612;   --warn-bg: #FBF0DC;
    --late: #AE3428;   --late-bg: #FBE6E2;
    --info: #3A6A93;   --info-bg: #E6EEF6;
    --muted: #7A7066;  --muted-bg: #EFECE6;
    --alert: #B3261E;  --alert-bg: #FDECEA;

    font-family: var(--f);
    color: var(--ink);
}

/* ==========================================================================
   SHELL - header bar, menu row, page container
   ========================================================================== */

.rd {
    min-height: 100vh;
    background: var(--page);
    font-size: var(--fs-md);
    line-height: 1.5;
}

/* the page lives inside EmptyLayout's padded .content - undo that */
.main:has(> .content > .rd) .content { padding: 0 !important; }

.rd-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- header: brown, carries the identity --- */
.rd-top {
    background: var(--brown-800);
    color: var(--beige-100);
}

.rd-top .rd-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 60px;
}

.rd-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.rd-brand img {
    height: 44px;
    width: auto;
    border-radius: 6px 6px 3px 3px;
    flex: none;
}

.rd-brand-n { font-size: 17px; font-weight: 700; line-height: 1.15; color: #fff; }
.rd-brand-s { font-size: var(--fs-xs); color: var(--tan-300); }

.rd-top-sp { flex: 1; }

.rd-top-chip {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .1);
    color: var(--tan-300);
    border: 1px solid rgba(210, 191, 160, .35);
    white-space: nowrap;
}

.rd-top-user { font-size: var(--fs-md); font-weight: 600; color: #fff; white-space: nowrap; }

.rd-top-ic {
    width: 32px; height: 32px;
    display: inline-grid; place-items: center;
    border-radius: 8px;
    color: var(--tan-300);
    cursor: pointer;
    background: none; border: 0;
    font-size: 14px;
}
.rd-top-ic:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* --- menu row --- */
.rd-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

/* overflow stays visible on wide screens, or the "מנהל" sub-menu is clipped */
.rd-nav .rd-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 48px;
}

/* --- the "מנהל" sub-menu --- */
.rd-nav-dd { position: relative; outline: none; }

.rd-nav-dd-b {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    border-radius: var(--r-md);
    font-size: var(--fs-lg);
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    white-space: nowrap;
}
.rd-nav-dd-b > i:first-child { color: var(--tan-700); font-size: 13px; }
.rd-nav-dd-c { font-size: 9px; color: var(--ink-3); transition: transform .15s; }

.rd-nav-dd:hover .rd-nav-dd-b,
.rd-nav-dd:focus-within .rd-nav-dd-b { background: var(--beige-100); color: var(--ink); }
.rd-nav-dd:hover .rd-nav-dd-c,
.rd-nav-dd:focus-within .rd-nav-dd-c { transform: rotate(180deg); }

.rd-nav-dd-m {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    z-index: 200;
    min-width: 190px;
    padding: 6px;
    margin-top: 4px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: 0 14px 34px -14px rgba(59, 42, 31, .35);
}
/* a bridge over the 4px gap, so the menu does not close on the way down */
.rd-nav-dd-m::before { content: ""; position: absolute; inset: -6px 0 auto 0; height: 6px; }
.rd-nav-dd:hover .rd-nav-dd-m,
.rd-nav-dd:focus-within .rd-nav-dd-m { display: block; }

.rd-nav .rd-nav-dd-m a {
    display: flex;
    height: 34px;
    width: 100%;
    font-size: var(--fs-md);
}

@media (max-width: 1100px) {
    .rd-nav .rd-wrap { overflow-x: auto; }
}

.rd-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 12px;
    border-radius: var(--r-md);
    font-size: var(--fs-lg);
    font-weight: 500;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
}
.rd-nav a i { color: var(--tan-700); font-size: 13px; }
.rd-nav a:hover { background: var(--beige-100); color: var(--ink); }

.rd-nav a.on {
    background: var(--tan-100);
    color: var(--brown-700);
    font-weight: 700;
    box-shadow: inset 0 -2px 0 var(--tan-500);
}
.rd-nav a.on i { color: var(--brown-700); }

/* --- demo bar: says this is a demo, and holds the role switch --- */
.rd-demo {
    background: var(--warn-bg);
    border-bottom: 1px solid #EAD6B0;
    color: var(--warn);
    font-size: var(--fs-sm);
}
.rd-demo .rd-wrap { display: flex; align-items: center; gap: 14px; min-height: 32px; flex-wrap: wrap; }
.rd-demo label { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; cursor: pointer; font-weight: 600; }

/* --- the pinned block: header, menu, demo bar and the page title row --- */
.rd-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 6px 14px -12px rgba(59, 42, 31, .45);
}

/* see-through, so content scrolling underneath shows this is not the top of
   the page; the slight blur keeps the title readable over whatever passes */
.rd-sticky-head {
    background: rgba(246, 243, 238, .75);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    border-bottom: 1px solid var(--line);
}
/* pinned, the title row is kept thin: title and its line side by side */
.rd-sticky-head .rd-head { margin: 0; padding: 7px 0; gap: 12px; }
.rd-sticky-head .rd-head > div:first-child { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rd-sticky-head .rd-head h1 { font-size: 18px; }
.rd-sticky-head .rd-sub { margin: 0; }
.rd-sticky-head .rd-acts .rd-btn { height: 32px; }

.rd-clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2); }

/* --- page body --- */
.rd-body { padding: 18px 0 60px; }

.rd-head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.rd-head h1 { font-size: var(--fs-h1); font-weight: 700; margin: 0; line-height: 1.25; color: var(--ink); }
.rd-sub { font-size: var(--fs-sm); color: var(--ink-3); margin: 2px 0 0; }
.rd-acts { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ==========================================================================
   BUTTONS - work on a plain <button>, an <a>, or a Syncfusion SfButton
   ========================================================================== */

.rd .rd-btn,
.rd-dlg .rd-btn,
.rd .e-btn.rd-btn,
.rd-dlg .e-btn.rd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: var(--ctl-h);
    padding: 0 14px;
    border-radius: var(--r-md);
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--f);
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1;
    text-transform: none;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
    white-space: nowrap;
}
.rd .rd-btn:hover, .rd-dlg .rd-btn:hover,
.rd .e-btn.rd-btn:hover, .rd-dlg .e-btn.rd-btn:hover { background: var(--beige-100); border-color: var(--tan-300); color: var(--ink); }

.rd .rd-btn i, .rd-dlg .rd-btn i { font-size: 12px; }

/* primary - blue */
.rd .rd-btn--primary, .rd-dlg .rd-btn--primary,
.rd .e-btn.rd-btn--primary, .rd-dlg .e-btn.rd-btn--primary {
    background: var(--blue-700);
    border-color: var(--blue-700);
    color: #fff;
}
.rd .rd-btn--primary:hover, .rd-dlg .rd-btn--primary:hover,
.rd .e-btn.rd-btn--primary:hover, .rd-dlg .e-btn.rd-btn--primary:hover { background: var(--blue-800); border-color: var(--blue-800); color: #fff; }

/* brown - money actions */
.rd .rd-btn--brown, .rd-dlg .rd-btn--brown,
.rd .e-btn.rd-btn--brown, .rd-dlg .e-btn.rd-btn--brown {
    background: var(--brown-700);
    border-color: var(--brown-700);
    color: #fff;
}
.rd .rd-btn--brown:hover, .rd-dlg .rd-btn--brown:hover,
.rd .e-btn.rd-btn--brown:hover, .rd-dlg .e-btn.rd-btn--brown:hover { background: var(--brown-900); border-color: var(--brown-900); color: #fff; }

/* approve - green */
.rd .rd-btn--ok, .rd-dlg .rd-btn--ok,
.rd .e-btn.rd-btn--ok, .rd-dlg .e-btn.rd-btn--ok {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
}
/* «בקשה חריגה» - a small mark, no words, inside «אשר טופס» (owner, 6/11/26) */
.rd .rd-btn .rd-exc { font-size: 11px; margin-inline-end: 5px; color: #FFE08A; }
.rd .rd-btn--ok:hover, .rd-dlg .rd-btn--ok:hover,
.rd .e-btn.rd-btn--ok:hover, .rd-dlg .e-btn.rd-btn--ok:hover { background: #2C5E3F; border-color: #2C5E3F; color: #fff; }

.rd .rd-btn[disabled], .rd-dlg .rd-btn[disabled],
.rd .e-btn.rd-btn:disabled, .rd-dlg .e-btn.rd-btn:disabled { opacity: .45; cursor: default; }

/* small - inside table rows */
.rd .rd-btn--sm, .rd-dlg .rd-btn--sm,
.rd .e-btn.rd-btn--sm, .rd-dlg .e-btn.rd-btn--sm {
    height: 28px;
    padding: 0 11px;
    font-size: var(--fs-sm);
    border-radius: var(--r-sm);
}

/* ==========================================================================
   CHIPS, PILLS, SEARCH
   ========================================================================== */

.rd-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.rd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border-radius: 20px;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--ink-2);
    font-family: var(--f);
    font-size: var(--fs-sm);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.rd-chip:hover { border-color: var(--tan-500); color: var(--ink); }
.rd-chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.rd-chip.on { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.rd-chip--filter { background: var(--blue-100); border-color: var(--blue-600); color: var(--blue-800); font-weight: 600; }
.rd-chip--filter i { font-size: 11px; }

.rd-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-xs);
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.5;
}
.rd-pill--ok    { background: var(--ok-bg);    color: var(--ok); }
.rd-pill--warn  { background: var(--warn-bg);  color: var(--warn); }
.rd-pill--late  { background: var(--late-bg);  color: var(--late); }
.rd-pill--info  { background: var(--info-bg);  color: var(--info); }
.rd-pill--muted { background: var(--muted-bg); color: var(--muted); }

.rd-search {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.rd-search:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(58, 106, 147, .14); }
.rd-search i { color: var(--ink-3); font-size: 13px; }
.rd-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: none;
    font-family: var(--f);
    font-size: var(--fs-md);
    color: var(--ink);
    min-width: 0;
}
.rd-search input::placeholder { color: var(--ink-3); }

/* ==========================================================================
   PANELS AND TILES
   ========================================================================== */

.rd-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.rd-panel-h {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px 12px;
}
.rd-panel-t { font-size: var(--fs-h2); font-weight: 700; margin: 0; }
.rd-panel-c { font-size: var(--fs-sm); color: var(--ink-3); }

/* summary tiles - the pastel figures across the top */
.rd-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.rd-tile {
    border-radius: var(--r-lg);
    padding: 14px 16px 13px;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.rd-tile-k { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); font-weight: 700; }
.rd-tile-k i { font-size: 12px; }
.rd-tile-v { font-size: var(--fs-num); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--ink); }
.rd-tile-s { font-size: var(--fs-sm); color: var(--ink-3); }

.rd-tile--brown { background: var(--tan-100);  border-color: #E9DDC7; }
.rd-tile--brown .rd-tile-k { color: var(--brown-700); }
.rd-tile--blue  { background: var(--blue-50);  border-color: #DCE6EF; }
.rd-tile--blue  .rd-tile-k { color: var(--blue-700); }
.rd-tile--beige { background: var(--beige-100); border-color: var(--beige-200); }
.rd-tile--beige .rd-tile-k { color: var(--tan-700); }
.rd-tile--red   { background: var(--late-bg);  border-color: #F3D2CC; }
.rd-tile--red   .rd-tile-k { color: var(--late); }

/* ==========================================================================
   SYNCFUSION GRID - flattened to read like the reference table
   ========================================================================== */

.rd .e-grid {
    font-family: var(--f);
    font-size: var(--fs-md);
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
    overflow: hidden;
}

.rd .e-grid .e-gridheader { border-bottom: 1px solid var(--line); padding: 0 !important; }
.rd .e-grid .e-gridheader,
.rd .e-grid .e-headercontent,
.rd .e-grid .e-headercell { background: var(--beige-50); }

.rd .e-grid .e-headercell { height: 36px; padding: 0 10px; }
.rd .e-grid .e-headercell .e-headertext,
.rd .e-grid .e-headercelldiv { font-family: var(--f); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }

.rd .e-grid .e-rowcell {
    height: var(--row-h);
    padding: 5px 10px;
    font-size: var(--fs-md);
    color: var(--ink);
    border-color: var(--line);
    vertical-align: middle;
}
.rd .e-grid .e-content { overflow-y: visible !important; }
.rd .e-grid .e-row:hover .e-rowcell { background-color: var(--beige-50) !important; }
.rd .e-grid .e-emptyrow td { padding: 22px; text-align: center; color: var(--ink-3); }

/* row tinting by what the row needs - the same meaning as the status icon */
.rd .e-grid .e-row.rd-row-late   .e-rowcell { background-color: #FDF1EF !important; }
.rd .e-grid .e-row.rd-row-warn   .e-rowcell { background-color: #FDF8EE !important; }
.rd .e-grid .e-row.rd-row-info   .e-rowcell { background-color: #F3F7FB !important; }
.rd .e-grid .e-row.rd-row-muted  .e-rowcell { background-color: #F7F5F1 !important; color: var(--ink-3); }

.rd .e-grid .e-row.rd-row-late:hover  .e-rowcell { background-color: #FBE6E2 !important; }
.rd .e-grid .e-row.rd-row-warn:hover  .e-rowcell { background-color: #FBF0DC !important; }
.rd .e-grid .e-row.rd-row-info:hover  .e-rowcell { background-color: #E6EEF6 !important; }
.rd .e-grid .e-row.rd-row-muted:hover .e-rowcell { background-color: #EFECE6 !important; }

/* ==========================================================================
   FAMILY STATUSES - the colours the gabbaim already know.
   Services.razor paints recipient rows with these, and they keep their
   meaning here; only the shade is softened so the text stays readable.
     approved   lightgreen            (Services: .approved)
     paused     lightskyblue          (Services: .paused)
     soft       lightsalmon           (Services: .pendingLightReapproval)
     hard       lightpink             (Services: .pendingHardReapproval)
     submitted  lightgoldenrodyellow  (Services: .submitted)
   To go back to the exact original shades, put those five names in the
   --*-row tokens below.
   ========================================================================== */

.rd,
.rd-dlg {
    --approved-row: #E2F4DF;  --approved-fg: #2E7A3A;
    --paused-row:   #DCEDFA;  --paused-fg:   #2C6A9A;
    --soft-row:     #FDE5D8;  --soft-fg:     #B0502A;
    --hard-row:     #FBDFE4;  --hard-fg:     #AE2F45;
    --submitted-row:#FAF6D6;  --submitted-fg:#857512;
}

.rd .e-grid .e-row.rd-row-approved  .e-rowcell { background-color: var(--approved-row) !important; }
.rd .e-grid .e-row.rd-row-paused    .e-rowcell { background-color: var(--paused-row) !important; }
.rd .e-grid .e-row.rd-row-soft      .e-rowcell { background-color: var(--soft-row) !important; }
.rd .e-grid .e-row.rd-row-hard      .e-rowcell { background-color: var(--hard-row) !important; }
.rd .e-grid .e-row.rd-row-submitted .e-rowcell { background-color: var(--submitted-row) !important; }

/* a touch deeper under the mouse, same colour */
.rd .e-grid .e-row.rd-row-approved:hover  .e-rowcell { background-color: color-mix(in srgb, var(--approved-row) 82%, var(--approved-fg)) !important; }
.rd .e-grid .e-row.rd-row-paused:hover    .e-rowcell { background-color: color-mix(in srgb, var(--paused-row) 88%, var(--paused-fg)) !important; }
.rd .e-grid .e-row.rd-row-soft:hover      .e-rowcell { background-color: color-mix(in srgb, var(--soft-row) 88%, var(--soft-fg)) !important; }
.rd .e-grid .e-row.rd-row-hard:hover      .e-rowcell { background-color: color-mix(in srgb, var(--hard-row) 88%, var(--hard-fg)) !important; }
.rd .e-grid .e-row.rd-row-submitted:hover .e-rowcell { background-color: color-mix(in srgb, var(--submitted-row) 85%, var(--submitted-fg)) !important; }

.rd-pill--approved  { background: var(--approved-row);  color: var(--approved-fg); }
.rd-pill--paused    { background: var(--paused-row);    color: var(--paused-fg); }
.rd-pill--soft      { background: var(--soft-row);      color: var(--soft-fg); }
.rd-pill--hard      { background: var(--hard-row);      color: var(--hard-fg); }
.rd-pill--submitted { background: var(--submitted-row); color: var(--submitted-fg); }

/* in a tinted row the pill needs an edge, or it melts into the row */
.rd .e-grid .e-row .rd-pill--approved,
.rd .e-grid .e-row .rd-pill--paused,
.rd .e-grid .e-row .rd-pill--soft,
.rd .e-grid .e-row .rd-pill--hard,
.rd .e-grid .e-row .rd-pill--submitted { background: #fff; box-shadow: inset 0 0 0 1px currentColor; }

.rd-ico--approved  { color: var(--approved-fg); }
.rd-ico--paused    { color: var(--paused-fg); }
.rd-ico--soft      { color: var(--soft-fg); }
.rd-ico--hard      { color: var(--hard-fg); }
.rd-ico--submitted { color: var(--submitted-fg); }

.rd-ico { font-size: 14px; }

/* ==========================================================================
   CONGREGATION PAUSE ICON - the family pause sign with a small house on it.
   A different shape (stop vs pause) was not read as a different meaning;
   the same pause sign plus a house says "paused - the whole congregation".
     <span class="rd-ico-cong"><i class="fa-solid fa-circle-pause"></i><i class="fa-solid fa-house"></i></span>
   ========================================================================== */
.rd-ico-cong {
    position: relative;
    display: inline-block;
    line-height: 1;
    color: var(--paused-fg);
    font-size: 15px;
    vertical-align: -2px;
}
.rd-ico-cong > i:first-child { display: block; }
.rd-ico-cong > i + i {
    position: absolute;
    inset-inline-start: -5px;
    bottom: -3px;
    font-size: .52em;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    color: var(--paused-fg);
    box-shadow: 0 0 0 1px var(--paused-fg);
}
.rd-ico-cong--lg { font-size: 18px; }
.rd-ico--late  { color: var(--late); }
.rd-ico--warn  { color: var(--warn); }
.rd-ico--info  { color: var(--info); }
.rd-ico--muted { color: var(--muted); }
.rd-ico--ok    { color: var(--ok); }

.rd-num  { font-variant-numeric: tabular-nums; font-weight: 600; }
.rd-dim  { color: var(--ink-3); font-size: var(--fs-sm); }
.rd-ltr  { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* a plain table, for lists inside dialogs - reads like the grid */
.rd-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); border: 1px solid var(--line); border-radius: var(--r-md); }
.rd-table th {
    background: var(--beige-50); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600;
    text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.rd-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); height: var(--row-h); vertical-align: middle; }
.rd-table tbody tr:last-child td { border-bottom: 0; }
.rd-table tbody tr:hover td { background: var(--beige-50); }

.rd-tablefoot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    font-size: var(--fs-sm);
    color: var(--ink-3);
}

/* ==========================================================================
   DIALOGS - Syncfusion SfDialog with CssClass="rd-dlg"
   ========================================================================== */

.e-dialog.rd-dlg {
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px -20px rgba(59, 42, 31, .35);
    overflow: hidden;
}
.e-dialog.rd-dlg .e-dlg-header-content {
    background: var(--beige-50);
    border-bottom: 1px solid var(--line);
    padding: 13px 18px;
}
.e-dialog.rd-dlg .e-dlg-header,
.e-dialog.rd-dlg .e-dlg-header * { font-family: var(--f); }
.e-dialog.rd-dlg .e-dlg-content { padding: 16px 18px; font-size: var(--fs-md); color: var(--ink); }
.e-dialog.rd-dlg .e-footer-content { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }

.rd-dlg-h { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; color: var(--ink); }
.rd-dlg-f { display: flex; align-items: center; gap: 8px; }
.rd-dlg-f .rd-dlg-note { flex: 1; text-align: start; font-size: var(--fs-sm); color: var(--ink-3); }

/* inputs inside the dialogs */
.rd-dlg .e-input-group,
.rd-dlg .e-input-group.e-control-wrapper {
    border: 1px solid var(--line-2) !important;
    border-radius: var(--r-md);
    padding: 0 10px;
    margin: 0;
    min-height: var(--ctl-h);
    background: var(--surface);
}
.rd-dlg .e-input-group::before,
.rd-dlg .e-input-group::after { display: none; }
.rd-dlg .e-input-group.e-input-focus { border-color: var(--blue-600) !important; box-shadow: 0 0 0 3px rgba(58, 106, 147, .14); }
.rd-dlg .e-input-group input.e-input,
.rd-dlg .e-input-group .e-input {
    font-family: var(--f);
    font-size: var(--fs-md);
    padding: 6px 0;
    height: auto;
    min-height: 0;
}
.rd-dlg .e-input-group.e-multi-line-input textarea.e-input { min-height: 54px; }

/* the Syncfusion uploader, reduced to its button - the chosen file is shown
   by the page itself, so the uploader's own list would only spill over */
.rd-dlg .e-upload.e-control-wrapper {
    width: 100%; min-height: 0; height: auto;
    border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--beige-50);
}
.rd-dlg .e-upload .e-file-select-wrap { padding: 4px 8px; justify-content: center; }
.rd-dlg .e-upload .e-file-select-wrap .e-btn {
    height: 26px; padding: 0 14px; font-size: var(--fs-sm); font-family: var(--f);
    text-transform: none; border-radius: var(--r-sm);
    background: var(--brown-700); color: #fff; border: 0;
}
.rd-dlg .e-upload .e-file-drop { font-size: var(--fs-xs); color: var(--ink-3); }
.rd-dlg .e-upload .e-upload-files { display: none; }

.rd-field { margin-bottom: 12px; min-width: 0; }
.rd-field > label,
.rd-lbl {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 5px;
}
.rd-req { color: var(--late); font-weight: 700; }
.rd-hint { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 5px; line-height: 1.55; }

.rd-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd-g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* a framed group of fields inside a dialog - "פרטי המשפחה", "פרטי המקרה" */
.rd-fs { border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 14px 2px; margin: 0 0 12px; }
.rd-fs legend {
    float: none; width: auto; margin: 0; padding: 0 6px;
    font-size: var(--fs-sm); font-weight: 700; color: var(--brown-700);
}

/* a confirmation question, the facts under it, and a tick that must be set */
.rd-q { font-size: var(--fs-lg); margin: 0 0 12px; }
.rd-q-list { max-width: none; margin-bottom: 10px; }
.rd-tick { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; margin: 0; }

/* note boxes */
.rd-box {
    border-radius: var(--r-md);
    padding: 9px 13px;
    font-size: var(--fs-md);
    line-height: 1.6;
    margin-bottom: 12px;
    border: 1px solid transparent;
}
.rd-box--ok    { background: var(--ok-bg);   border-color: #C6DECD; color: #2C5E3F; }
.rd-box--warn  { background: var(--warn-bg); border-color: #EAD6B0; color: var(--warn); }
.rd-box--info  { background: var(--blue-50); border-color: #CFDCE8; color: var(--blue-800); }
.rd-box--plain { background: var(--beige-50); border-color: var(--line); color: var(--ink-2); }
.rd-box--danger { background: var(--late-bg); border-color: #F3D2CC; color: var(--late); }
.rd-box code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    background: rgba(255, 255, 255, .7);
    padding: 0 5px;
    border-radius: 4px;
    direction: ltr;
    display: inline-block;
}

/* ==========================================================================
   DONE - the confirmation a gabbai sees after an action succeeded.
   Plain words only: what happened, what it means, what comes next.
   ========================================================================== */

.rd-done { text-align: center; padding: 10px 6px 4px; }

.rd-done-ic {
    width: 64px; height: 64px; margin: 0 auto 12px;
    border-radius: 50%; display: grid; place-items: center;
    background: var(--ok-bg); color: var(--ok); font-size: 30px;
    box-shadow: 0 0 0 8px rgba(58, 117, 80, .08);
    animation: rd-done-pop .35s cubic-bezier(.2, .9, .3, 1.3);
}

.rd-done-t { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.rd-done-s { font-size: var(--fs-lg); color: var(--ink-2); margin: 0 auto 16px; max-width: 460px; line-height: 1.6; }
.rd-done-s b { color: var(--ink); }

.rd-done-list {
    text-align: start; max-width: 460px; margin: 0 auto;
    border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.rd-done-row {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; border-top: 1px solid var(--line);
    font-size: var(--fs-md); background: var(--surface);
}
.rd-done-row:first-child { border-top: 0; }
.rd-done-row > i { width: 18px; text-align: center; color: var(--tan-700); font-size: 13px; }
.rd-done-row > span { flex: 1; color: var(--ink-2); }
.rd-done-row > b { font-variant-numeric: tabular-nums; }

.rd-done-note { font-size: var(--fs-sm); color: var(--ink-3); margin: 12px auto 0; max-width: 460px; }

@keyframes rd-done-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rd-done-ic { animation: none; } }

@media (max-width: 760px) {
    .rd-wrap { padding: 0 16px; }
    .rd-g2, .rd-g3 { grid-template-columns: 1fr; }
    .rd-top-chip, .rd-top-user { display: none; }
}

/* ==========================================================================
   WINDOWS, TABS AND PLAIN INPUTS - shared by the admin pages (cities, rules,
   notices; 16/10/26). The same overlay and window the Congregations page
   draws for itself (cg-ov / cg-win), made shared so every page built after
   it gets one look. A window: .rd-ov > .rd-win > .rd-win-h / .rd-tabs /
   .rd-win-c / .rd-win-f. Plain native inputs (.rd-in, .rd-sel) in the
   design's sizes, for pages that need no Syncfusion control.
   ========================================================================== */

.rd-ov {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(43, 36, 32, .38);
    display: grid; place-items: center;
    padding: 20px; min-height: 0;
}
.rd-ov--top { z-index: 950; }

.rd-win {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px -20px rgba(59, 42, 31, .45);
    width: min(980px, 100%);
    max-height: calc(100vh - 40px);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.rd-win--sm { width: min(560px, 100%); }
.rd-win--md { width: min(760px, 100%); }

.rd-win-h {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    background: var(--beige-50);
    border-bottom: 1px solid var(--line);
}
.rd-win-sub { font-size: var(--fs-sm); color: var(--ink-3); }
.rd-x {
    width: 32px; height: 32px; flex: none;
    border: 0; background: none; border-radius: 8px;
    color: var(--ink-2); cursor: pointer;
}
.rd-x:hover { background: var(--beige-200); }
.rd-win-c { padding: 16px 18px; overflow-y: auto; flex: 1; min-height: 0; }
.rd-win-f {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.rd-win-f .rd-dim { flex: 1; }

.rd-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rd-tabs button {
    height: 40px; padding: 0 14px;
    border: 0; border-bottom: 2px solid transparent; background: none;
    font-family: var(--f); font-size: var(--fs-lg); font-weight: 500;
    color: var(--ink-2); cursor: pointer;
}
.rd-tabs button i { color: var(--tan-700); font-size: 12px; margin-inline-end: 4px; }
.rd-tabs button:hover { color: var(--ink); }
.rd-tabs button.on { color: var(--brown-700); font-weight: 700; border-bottom-color: var(--tan-500); }

/* plain inputs */
.rd-in, .rd-sel {
    height: var(--ctl-h);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    background: var(--surface);
    padding: 0 10px;
    font-family: var(--f); font-size: var(--fs-md); color: var(--ink);
    min-width: 0; width: 100%;
}
.rd-in:focus, .rd-sel:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(58, 107, 150, .15); }
.rd-in[disabled], .rd-sel[disabled] { background: var(--beige-50); color: var(--ink-3); }
.rd-in--num { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; }
.rd-in--bad { border-color: var(--late) !important; background: #FFF6F5; }
textarea.rd-in { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }

/* a labelled field: <label class="rd-f"><span>label</span><input class="rd-in"></label> */
.rd-f { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-sm); color: var(--ink-3); min-width: 0; }
.rd-f > span { font-weight: 600; color: var(--ink-2); }

/* a filter row above a table */
.rd-filters { flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.rd-filters .rd-f .rd-in, .rd-filters .rd-f .rd-sel { width: auto; min-width: 130px; }

.rd-empty { text-align: center; color: var(--ink-3); padding: 24px !important; }

/* a change asked before it is written: what was, what will be */
.rd-diff { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; margin: 0 0 12px; }
.rd-diff dt { font-weight: 600; color: var(--ink-2); font-size: var(--fs-sm); white-space: nowrap; }
.rd-diff dd { margin: 0; }
.rd-diff .rd-was { color: var(--ink-3); text-decoration: line-through; margin-inline-end: 8px; }
.rd-diff .rd-will { font-weight: 700; color: var(--blue-800); }

/* a big "done" line after a write, under the title */
.rd-flash { display: flex; align-items: center; gap: 9px; }
.rd-flash i { font-size: 15px; }

/* ---------- the Excel upload windows (DemoFamiliesUploadDialog, DemoHoursUploadDialog) ----------
   moved here from DemoTimesDialog.razor on 29/10/26, when that window left the Services page: a component's
   <style> renders only while the component is on the page, and the hours page has its own upload window */
.up { display: flex; flex-direction: column; gap: 10px; }
.up-cols { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.up-cols-l { font-weight: 600; }
.up-cols-r { display: flex; flex-wrap: wrap; gap: 4px; }
.up-cols-r span { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; font-size: var(--fs-sm); font-weight: 600; }
.up-cols-r small { color: var(--ink-3); font-weight: 400; direction: ltr; }
.up-paste {
    width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; resize: vertical;
    font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-sm); direction: ltr; text-align: left; background: #fff;
}
.up-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.up-sum { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
.up-sum .ok { color: var(--ok); }
.up-sum .bad { color: var(--late); }
.up-table { max-height: 320px; overflow-y: auto; }
.up-table tr.up-bad td { background: #FDF1EF; }
.up-err { color: var(--late); font-size: var(--fs-sm); font-weight: 600; }
.up-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px;
    border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--beige-50); color: var(--ink-2); cursor: pointer;
}
.up-drop:hover { border-color: var(--tan-500); }
.up-drop i { font-size: 24px; color: var(--ok); }
.up-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ==========================================================================
   «יתרות זכות בעונתי» - the admin's tab of the transactions page
   (Components/SeasonalCreditsPanel.razor; owner, 12/11/26 - items 27 / 53 / 26).
   Only what the page's own classes (tx-…) and the shared ones above do not
   give: the tab's frame, its greyed rows, the notes, the row buttons and the
   confirm window's text. The tab sits inside the shell, so every rule is
   under .rd.
   ========================================================================== */
.rd .sc { border-top: 1px solid var(--line); padding: 14px 16px 16px; }
.rd .sc-intro { margin-bottom: 12px; }
.rd .sc-intro p { margin: 0; }
.rd .sc-intro small { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-3); }
.rd .sc-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rd .sc-fail { display: flex; align-items: center; gap: 9px; }
.rd .sc-fail > span { flex: 1; }
.rd .sc-table td { padding-top: 7px; padding-bottom: 7px; }
/* the four buttons of a credit balance in one line, when the table has the room */
.rd .sc-th-acts { width: 372px; }
/* a row that cannot be decided yet - its distribution is still open, or its close has not finished */
.rd .sc-wait td { background: var(--beige-50); color: var(--ink-3); }
.rd .sc-wait .tx-strong, .rd .sc-wait .tx-ok, .rd .sc-wait .tx-late { color: var(--ink-3); }
.rd .sc-note { display: block; max-width: 320px; font-size: var(--fs-sm); line-height: 1.45; color: var(--ink-2); }
.rd .sc-note--warn { color: var(--warn); font-weight: 600; }
.rd .sc-note .tx-link { margin-inline-start: 6px; }
.rd .sc-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.rd .sc-ask p { margin: 0 0 9px; line-height: 1.6; }
.rd .sc-ask .rd-box { margin: 12px 0 0; }
.rd .sc-ask .rd-f { margin-top: 12px; }
.rd .sc-ask input[type=date] { width: 190px; }
