/* The interface framework (plan 8.2, the mock-up "Madadim Framework Variants", variant א): navy header with the Acc Sys
   logo, module › screen navigation, user menu, status bar; Heebo; buttons react to the mouse. */
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../lib/fonts/heebo-hebrew-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Heebo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../lib/fonts/heebo-latin-wght-normal.woff2") format("woff2-variations");
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --navy: #1b3157; --navy-2: #26447a; --navy-ink: #dbe4f3; --navy-muted: #8ea3c4;
  --accent: #2f5b9a; --link: #1e5fb0; --bg: #f3f5f8; --card: #ffffff; --text: #1d2433; --muted: #5b6573;
  --border: #e3e8ef; --border-2: #d6dde8; --hover: #eef3fa; --good: #1a7f4b; --bad: #b42318;
  --font: "Heebo", "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif;
  --header-h: 52px; --status-h: 30px;
  /* the page column of gs-ui's shell.css (plan 8.22): the frame itself comes from there */
  --page-max: 1040px; --page-gap: 20px;
}
* { box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }
/* the framework's stroke icons only: the screens draw their charts in SVG too — never size those */
:where(.top, .status, .home, .login, .btn, .got-it) svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header */
.top { height: var(--header-h); flex: none; display: flex; align-items: center; gap: 4px; padding: 0 12px; background: var(--navy); color: var(--navy-ink); }
.top .logo { display: inline-flex; align-items: center; background: #fff; border-radius: 6px; padding: 3px 8px; transition: box-shadow .15s; }
.top .logo:hover { box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.top .logo img { height: 24px; width: auto; display: block; }
.brand { color: #fff; font-weight: 700; font-size: 19px; text-decoration: none; padding: 0 10px; }
.top .sep { width: 1px; height: 24px; background: rgba(255,255,255,.2); margin: 0 4px; }
.top .crumb { color: var(--navy-muted); }
.top .pos { font-size: 12px; color: var(--navy-muted); padding: 0 4px; white-space: nowrap; }
.top .grow { flex: 1; }
.nb { list-style: none; border: 0; background: transparent; color: var(--navy-ink); height: 34px; padding: 0 10px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
  /* one style for every header item (8.27 item 12): a link («עזרה») is not underlined, the hover background says it */
  text-decoration: none; }
.nb::-webkit-details-marker { display: none; }
.nb:hover, details[open] > .nb { background: rgba(255,255,255,.13); color: #fff; }
.nb.strong { color: #fff; font-weight: 600; }
.nb .caret { width: 12px; height: 12px; stroke-width: 2.5; }
.ib { width: 34px; height: 34px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--navy-ink); transition: background .15s, color .15s; }
.ib svg { width: 18px; height: 18px; }
/* the previous / next screen arrows are drawn right to left; an English (left-to-right) page turns them (plan 6.10) */
.ib:dir(ltr) svg { transform: scaleX(-1); }
a.ib:hover { background: rgba(255,255,255,.14); color: #fff; }
.ib.off { opacity: .3; }
.firm { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; white-space: nowrap; }
.firm .firm-name { color: #fff; font-size: 16px; font-weight: 600; }
.firm .firm-logo { height: 32px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px 6px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: #3f6aa8; color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }

/* header menus (<details>): modules, screens, user */
details.menu { position: relative; }
.menu-list { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 50; min-width: 220px; max-height: 70vh; overflow-y: auto;
  background: #fff; color: var(--text); border: 1px solid var(--border-2); border-radius: 8px; box-shadow: 0 10px 28px rgba(20,40,80,.18); padding: 6px; }
.user-menu .menu-list { inset-inline-start: auto; inset-inline-end: 0; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px;
  color: var(--text); text-decoration: none; font: inherit; font-size: 14px; text-align: start; cursor: pointer; transition: background .12s; }
.menu-list .menu-empty { display: block; padding: 8px 10px; color: var(--muted); font-size: 13px; font-style: italic; }
.menu-list a:hover, .menu-list button:hover { background: var(--hover); }
.menu-list a.current { background: #dfe8f5; font-weight: 600; color: var(--navy); }
.menu-list svg { color: var(--muted); }
.menu-list form { margin: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.menu-list form.language { border-top: 0; margin-top: 0; padding-top: 0; }
.menu-list .who { padding: 6px 10px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; direction: ltr; text-align: end; }
.menu-list .who:dir(ltr) { text-align: start; }   /* an English page: the name at the start, as the items below it */

/* status bar */
.status { height: var(--status-h); flex: none; display: flex; align-items: center; gap: 16px; padding: 0 14px; background: #fff; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.status .grow { flex: 1; }

/* page areas: main.page and main.full are gs-ui's shell.css (the header and the status bar stay, only <main> scrolls) */
h1 { font-size: 22px; color: var(--navy); margin: 0 0 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }

/* buttons and links: they react to the mouse */
.btn { margin-top: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 18px; background: var(--navy); color: #fff;
  border: none; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:hover { background: var(--navy-2); box-shadow: 0 3px 10px rgba(27,49,87,.28); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #fff; color: var(--navy); border: 1px solid var(--border-2); }
.btn.secondary:hover { background: var(--hover); border-color: #9db4d6; box-shadow: none; }
a.btn { display: inline-flex; }
button.link { background: none; border: none; color: var(--link); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { text-decoration: underline; }
.error { color: var(--bad); margin-top: 12px; }
.notice { color: var(--muted); font-size: .9rem; margin: 8px 0; }
.success { color: var(--good); margin-top: 12px; }

/* sign-in and account pages */
.login { max-width: 400px; margin: 48px auto; padding: 32px 30px; border-radius: 14px; box-shadow: 0 10px 30px rgba(20,40,80,.08); }
.login .login-logo { display: block; height: 56px; width: auto; margin: 0 auto 10px; }
.login label { display: block; margin: 14px 0 6px; font-size: 13px; color: #3d4a60; }
.login input[type=text], .login input[type=password], .login input[type=email] { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #cfd8e6; border-radius: 8px; font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s; }
.login input:hover { border-color: #9db4d6; }
.login input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,91,154,.18); }
.login .btn { width: 100%; height: 44px; font-size: 15px; font-weight: 600; }
.login .login-title { text-align: center; font-size: 30px; margin: 0; }
.login .login-links { text-align: center; margin: 16px 0 0; font-size: 13px; }
.login .login-links a { color: var(--link); text-decoration: none; }
.login .login-links a:hover { text-decoration: underline; }
.login .login-sub { text-align: center; color: var(--muted); margin: 4px 0 8px; }
/* the language on the pages without the header (plan 6.10): small, at the top corner of the page */
.bare-language { position: absolute; top: 14px; inset-inline-end: 18px; margin: 0; }
.bare-language button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; }
.bare-language button:hover { background: var(--hover); color: var(--link); }
.bare-language svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* icons drawn for right to left (a forward arrow, the sign-in door): an English page turns them */
.dir-icon:dir(ltr) { transform: scaleX(-1); }

/* home page (decision 158): a card per module (the side tree removed 03.10) */
.home { position: absolute; inset: 0; overflow: auto; display: flex; justify-content: center; }
.modules { flex: 1; min-width: 0; max-width: 1320px; padding: 26px 24px; }
.module-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.module-card { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.module-card:hover { box-shadow: 0 8px 24px rgba(20,40,80,.12); border-color: #c5d3e8; }
.module-card .picture { flex: 0 0 190px; min-height: 190px; background: var(--t); padding: 14px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 34px; gap: 7px; }
.picture > span { background: #fff; border-radius: 5px; display: flex; }
.picture .p-bars { align-items: flex-end; gap: 3px; padding: 7px; }
.picture .p-bars i { flex: 1; background: var(--c); }
.picture .p-ring { align-items: center; justify-content: center; }
.picture .p-ring i { width: 42px; height: 42px; border-radius: 50%; border: 10px solid var(--c); border-inline-start-color: var(--t); }
.picture .p-lines { grid-column: span 2; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; }
.picture .p-lines i { height: 5px; background: #d5deeb; }
.picture .p-icon { grid-column: span 2; align-items: center; justify-content: center; color: var(--c); }
.picture .p-icon svg { width: 22px; height: 22px; }
.module-card .text { flex: 1 1 300px; min-width: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.module-card .title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.module-card .badge { width: 32px; height: 32px; border-radius: 8px; background: var(--t); color: var(--c); display: inline-flex; align-items: center; justify-content: center; }
.module-card h2 { margin: 0; font-size: 19px; color: var(--navy); }
.module-card .meta { font-size: 12px; color: var(--muted); }
.module-card .dates { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.module-card .data-date { display: inline-flex; align-items: center; gap: 4px; }
.module-card .data-date svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; }
.module-card .data-date.stale { color: #b42318; font-weight: 600; }
.module-card .picture.own { display: block; position: relative; padding: 0; overflow: hidden; }
.module-card .picture.own img { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; display: block; }
.module-card .description { margin: 0; line-height: 1.55; color: #3d4a60; }
.module-card .grow { flex: 1; }
.module-card .actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.module-card .btn.go { margin-top: 0; height: 36px; }
.whats-new { background: #f2f7fd; border: 1px solid #d3e2f5; border-radius: 8px; padding: 8px 12px; }
.whats-new .head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--link); }
.whats-new form { margin: 0; }
.whats-new p { margin: 4px 0 0; font-size: 13px; color: #3d4a60; white-space: pre-line; }   /* admin notes are plain text */
.whats-new .version { font-weight: 600; }
.got-it { border: 0; background: transparent; color: var(--link); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 4px; transition: background .15s; }
.got-it:hover { background: #e3edf9; }
.got-it svg { width: 13px; height: 13px; stroke-width: 2.5; }
.history summary { list-style: none; color: var(--muted); font-size: 12px; cursor: pointer; border-bottom: 1px dashed #9aa6b8; transition: color .15s; }
.history summary::-webkit-details-marker { display: none; }
.history summary:hover { color: var(--link); border-bottom-color: var(--link); }
.history ul { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: #3d4a60; }
.history li { padding: 4px 0; border-top: 1px solid var(--border); white-space: pre-line; }
.history .date { color: var(--muted); font-size: 12px; }
.screens ul { columns: 2 180px; column-gap: 18px; }
.screens li { break-inside: avoid; }
.screens a { color: #3d4a60; text-decoration: none; }
.screens a:hover { color: var(--link); text-decoration: underline; }
/* firm selection (users of several firms): one button per firm, in the login card */
.firms { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.firm-choice { padding: 10px 14px; background: #fff; border: 1px solid var(--border-2); border-radius: 8px; font: inherit; color: var(--text); text-align: start; cursor: pointer;
  transition: border-color .15s, background .15s; }
.firm-choice:hover { border-color: var(--accent); background: var(--hover); }
.firm-choice.current { border-color: var(--accent); }
.firm-choice .notice { margin: 0 6px; }
/* many firms (Dmitry 04.10): recent first, a search, the list scrolls inside the card */
.login.wide { max-width: 520px; }
.firms.many .firm-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; padding: 2px; }
.firms .firm-list { display: flex; flex-direction: column; gap: 8px; }
.firms-head { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.firm-search { height: 40px; padding: 0 12px; border: 1px solid #cfd8e6; border-radius: 8px; font: inherit; }
.firm-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47,91,154,.18); }
.firm-choice.recent { border-color: #c9d8ee; background: #f6f9fd; }
.firm-choice .code { float: inline-end; color: var(--muted); font-size: 12px; }

/* two-factor sign-in: enrollment steps, QR code, recovery codes */
.ltr { direction: ltr; unicode-bidi: embed; }
.steps { padding-inline-start: 20px; margin: 8px 0; }
#qr { text-align: center; margin: 8px 0; }
.codes { list-style: none; padding: 12px; margin: 8px 0; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; text-align: start; }   /* the codes are left to right in both languages (.ltr) */

/* narrow windows: the header keeps the navigation, the firm and the counter go */
@media (max-width: 900px) {
  .top .firm, .top .pos, .top .brand { display: none; }
  .nb { padding: 0 6px; }
}

/* the firm administrator's pages (plan 6.5 / 8.8) */
.manage { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
.manage h1 { color: var(--navy); font-size: 22px; margin: 0 0 6px; }
.manage .muted { color: var(--muted); margin: 0 0 14px; }
.manage-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.manage-add label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #3d4a60; }
.manage-add input, .manage-add select, .manage-table select { height: 34px; padding: 0 8px; border: 1px solid #cfd8e6; border-radius: 6px; font: inherit; background: #fff; }
.manage-add input { width: 280px; }
.manage-table { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: auto; }
.manage-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.manage-table th { background: #f7f9fc; color: #3d4a60; font-weight: 600; text-align: start; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.manage-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.manage-table tr:last-child td { border-bottom: 0; }
.manage-table td.actions form { margin-inline-end: 14px; }
.manage .inline { display: inline; margin: 0; }
.manage button.link { background: none; border: 0; color: var(--link); cursor: pointer; font: inherit; padding: 0; }
.manage button.link:hover { text-decoration: underline; }
.manage button.link.danger { color: #b42318; }
.manage .tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: #eef3fa; color: #3d4a60; margin-inline-end: 4px; }
.manage .tag.warn { background: #fdecea; color: #8a1c10; }
.success-box { background: #e7f5ea; border: 1px solid #9bd3a7; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.success-box code { font-size: 16px; font-weight: 600; margin: 0 8px; letter-spacing: 1px; }
.manage .error { background: #fdecea; border: 1px solid #f5b5ae; color: #8a1c10; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: start; }

/* עזרה (plan 6.8): the guides of the release */
.help { max-width: 820px; }
.help-section { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 18px; margin-bottom: 14px; }
.help-section h2 { color: var(--navy); font-size: 17px; margin: 0 0 6px; }
.help-section ul { margin: 0; padding-inline-start: 20px; }
.help-section li { margin: 5px 0; }
.help-section a { color: var(--link); font-weight: 600; }
.help .muted { color: var(--muted); }
@media (max-width: 900px) { .top .help-link span { display: none; } }

/* "עריכת נתונים" (decision 183): the firm's reference tables, parameters, recalculation */
.manage-h2 { color: var(--navy); font-size: 17px; margin: 22px 0 8px; }
.manage .tag.edit { background: #e6f4ea; color: #1e6b34; }
.manage-add .recalc-state { flex: 1; align-self: center; }
.param-form input { width: 220px; height: 30px; padding: 0 6px; border: 1px solid #cfd8e6; border-radius: 6px; font: inherit; }
/* a page with a table takes the whole width (plan 8.24, Dmitry 30.10: shell.css widens <main>, this its column) */
.manage:has(.table-box) { max-width: none; margin: 0; padding: 0; }
/* the menu's groups: settings, the general tables, the tables kept per year */
/* a group title sits on its dividing line (variant א, Dmitry 30.10): accent colour, the line runs on after it */
.menu-list .menu-group { display: flex; align-items: center; gap: 8px; padding: 10px 4px 4px; font-size: 12px; font-weight: 600; color: var(--accent); }
.menu-list .menu-group:first-child { padding-top: 4px; }
.menu-list .menu-group::after { content: ""; flex: 1; height: 1px; background: var(--border-2); }
/* the data menu's 14 items and 4 groups fit a laptop screen without scrolling; a long English name stays on one line */
.edit-menu .menu-list { max-height: calc(100vh - var(--header-h) - 16px); }
.edit-menu .menu-list a { padding-block: 6px; white-space: nowrap; }
/* a table from the file: said where it is seen, with the way to edit it here */
.from-file { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; margin: 0 0 12px;
  background: #fff7e6; border: 1px solid #f0d49a; border-radius: 8px; color: #6b4a00; }
.from-file form { margin: 0; }
.from-file .btn { margin: 0; height: 32px; padding: 0 14px; }
/* «ייבוא מ-REV»: the width it had before gs-ui 0.13 made the editor's pop fit its content (340px squeezed the long
   period names; review 01.11 M-4, picture approved by Dmitry 03.11) */
#ref-rev-dialog { width: min(640px, calc(100vw - 32px)); }
.ref-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.ref-toolbar .grow { flex: 1; }
.ref-toolbar select { height: 32px; border: 1px solid #cfd8e6; border-radius: 6px; font: inherit; margin-inline-start: 4px; }
.ref-dirty { color: #8a5a00; font-size: 13px; }
.ref-count { color: var(--muted); font-size: 13px; }
.ref-toolbar .btn, .manage-add form .btn { margin-top: 0; }

/* «ייבוא מ-REV» on the reference editor (plan 8.16): one line above the table, seen first */
.rev-import { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--border, #d7dbe0); border-radius: 8px; background: var(--hover, #f6f8fa); }
.rev-import .muted { flex-basis: 100%; }
.rev-import input.narrow { width: 7em; }
