/* KanafB — local-only Hebrew RTL administrative workspace. */
:root{--navy:#162c3b;--cream:#f6f5ef;--paper:#fff;--ink:#1c3441;--muted:#61717a;--line:#dce2df;--teal:#166b61;--teal-light:#e8f2ee;--danger:#a33333;--radius:10px;font-family:Arial,"Noto Sans Hebrew",sans-serif;color:var(--ink);background:var(--cream);font-size:15px;line-height:1.55}
*{box-sizing:border-box}
body{margin:0}
button,input,select,textarea{font:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{min-height:44px;padding:9px 17px;border:1px solid #cbd4d0;border-radius:7px;background:var(--paper);color:var(--ink);cursor:pointer;font-weight:600;transition:background .15s,border-color .15s}
button:hover{background:#f0f4f1;border-color:#a1b3ad}
button:disabled{opacity:.55;cursor:wait}
button.primary{background:var(--teal);color:white;border-color:var(--teal)}
button.primary:hover{background:#0f574e}
button.danger{background:var(--danger);color:white;border-color:var(--danger)}
button.danger-outline{color:var(--danger);border-color:#d6adad}
.danger-text{color:var(--danger);border-color:transparent;background:transparent}
.text-button{background:transparent;border-color:transparent}
.edit-button{padding-inline:15px;background:transparent;color:var(--teal);border-color:var(--line)}
:focus-visible{outline:3px solid #b27a26;outline-offset:3px}
h1,h2,h3,p{margin:0}
h1{font-size:32px;letter-spacing:-.9px;line-height:1.25}
h2{font-size:19px;line-height:1.4}
h3{font-size:17px}
small{display:block;font-size:12px;color:var(--muted)}
.muted{color:var(--muted);font-weight:400}
/* Workspace shell */
.shell{display:grid;grid-template-columns:228px minmax(0,1fr);min-height:100vh}
.sidebar{background:var(--navy);color:white;padding:32px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:12px;padding:0 10px 38px}
.brand strong{font-size:23px;line-height:1.25}
.brand small{color:#b9c9cd;font-size:12px}
.brand-mark{display:grid;place-items:center;border:1px solid #739a9c;width:42px;height:42px;border-radius:50% 50% 10px 50%;font-size:27px;color:#dcebe3;font-weight:700}
.nav-label{color:#a5bac4;font-size:11px;font-weight:700;padding:0 12px;margin-bottom:12px;letter-spacing:.7px}
.sidebar nav{display:flex;flex-direction:column;gap:7px}
.sidebar nav button{border:0;color:#cbd7db;background:transparent;text-align:right;min-height:49px;font-size:15px;font-weight:400;padding-inline:14px}
.sidebar nav button:hover{background:#213e4c}
.sidebar nav button.nav-active{background:#2b4e56;color:#fff;font-weight:700;box-shadow:inset 0 0 0 1px #47666b}
.sidebar-foot{margin-top:auto;border-top:1px solid #36505d;padding-top:19px;font-size:12px;color:#c6d2d6}
.sidebar-foot small{color:#a5bac4;font-size:11px;margin-top:5px}
.workspace{min-width:0}
.topbar{height:76px;border-bottom:1px solid var(--line);background:#fbfcf8;display:flex;align-items:center;justify-content:space-between;padding:0 40px;font-size:13px}
.topbar-separator{margin-inline:14px;color:#94a3a5}
.account{display:flex;align-items:center;gap:18px}
.account>span{font-size:13px;color:var(--muted);max-width:170px;overflow:hidden;text-overflow:ellipsis}
.account button{background:transparent;border:0;padding-inline:7px;font-weight:400;font-size:13px}
main#main{padding:36px 40px 22px;max-width:1550px;margin-inline:auto;min-height:calc(100vh - 76px);display:flex;flex-direction:column}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}
.page-heading h1{margin-bottom:9px}
.page-heading .muted{font-size:14px}
.eyebrow{font-size:11px;letter-spacing:1px;font-weight:700;color:var(--teal);margin-bottom:7px}
.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.summary-line{display:flex;gap:26px;padding:16px 0 23px;border-top:1px solid var(--line);font-size:13px;color:var(--muted);flex-wrap:wrap}
.summary-line strong{font-weight:700;color:var(--ink)}
/* Search and conjunctive filters */
.filters{display:grid;grid-template-columns:minmax(180px,1.5fr) repeat(4,minmax(105px,1fr));gap:12px;padding:19px;background:#edefe8;border:1px solid var(--line);border-radius:var(--radius)}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field>span{font-size:12px;font-weight:700;color:#52646a}
.field input,.field select,.field textarea{min-width:0;width:100%;min-height:44px;border:1px solid #c9d2cd;background:white;border-radius:6px;padding:10px 11px;color:var(--ink);font-size:14px}
.field input::placeholder{color:#7b898b}
.field textarea{resize:vertical}
.filters>.text-button{grid-column:1/-1;justify-self:start;font-size:12px;min-height:30px;padding:2px 0;color:var(--teal)}
.list-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:22px 0 12px}
.results-count{font-size:13px;color:var(--muted)}
.list-heading button{font-size:12px;min-height:40px;padding:7px 12px}
.panel{border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);overflow:hidden}
/* Personnel register */
.people-table{width:100%;border-collapse:collapse;text-align:right;table-layout:fixed}
.people-table th{font-size:11px;background:#fafbf8;font-weight:700;color:var(--muted);padding:14px 20px;border-bottom:1px solid var(--line)}
.people-table th:nth-child(1){width:30%}
.people-table th:nth-child(2){width:15%}
.people-table th:nth-child(3){width:43%}
.people-table th:nth-child(4){width:12%}
.people-table td{padding:20px;border-bottom:1px solid #e9eeea;vertical-align:top;font-size:14px;overflow-wrap:anywhere}
.people-table tr:last-child td{border-bottom:0}
.people-table tbody tr:hover{background:#fdfefa}
.person-name{display:flex;gap:11px;align-items:center}
.person-name strong{font-size:14px}
.person-name small{font-size:12px;margin-top:3px;unicode-bidi:plaintext}
.avatar{flex-shrink:0;display:grid;place-items:center;background:#eaf0eb;color:#48665e;border-radius:50%;width:35px;height:35px;font-size:16px}
.cert-list{display:grid;gap:10px}
.cert-item{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px}
.cert-item>span:first-child{max-width:100%;overflow-wrap:anywhere}
.badge{display:inline-block;border-radius:4px;padding:2px 7px;white-space:nowrap;font-size:11px}
.badge.valid{color:#1b6251;background:#e6f1ea}
.badge.soon{color:#80580c;background:#fbf0d7}
.badge.expired{color:#993b35;background:#fbe9e5}
.badge.undated{color:#586870;background:#edf0f1}
.empty{min-height:310px;padding:55px 24px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px;text-align:center}
.empty-symbol{color:#75948b;font-size:38px;font-weight:400;line-height:1}
.empty .muted{max-width:360px;font-size:14px}
.empty button{margin-top:10px}
.page-footer{margin-top:auto;padding-top:40px;display:flex;justify-content:space-between;gap:12px;color:#72827f;font-size:11px}
/* Catalogs and change log */
.catalog-row{padding:24px;display:flex;gap:20px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.catalog-row:last-child{border-bottom:0}
.catalog-row>div{min-width:0;overflow-wrap:anywhere}
.catalog-row h2{font-size:17px}
.catalog-row p{font-size:13px;white-space:pre-wrap;margin-top:6px}
.catalog-row button{flex-shrink:0;max-width:35%;overflow-wrap:anywhere}
.tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px;font-size:12px}
.tag{background:var(--teal-light);color:var(--teal);padding:3px 9px;border-radius:4px}
.history-panel{margin-bottom:22px;padding:24px}
.history-panel>h2{margin-bottom:12px}
.history-panel>.muted{font-size:13px;margin-bottom:12px}
.history-row{display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid var(--line);padding:17px 0;font-size:14px;overflow-wrap:anywhere}
.history-row time{font-size:12px;color:var(--muted);white-space:nowrap}
.history-row small{margin-top:5px}
/* Native modal drawers retain focus trapping and Escape behavior. */
dialog{border:0;border-radius:12px;color:var(--ink);background:var(--paper);width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;box-shadow:0 20px 90px #0e263a40}
dialog::backdrop{background:#10263399;backdrop-filter:blur(2px)}
.modal-open{overflow:hidden}
#editor{margin:16px 16px 16px auto;height:calc(100dvh - 32px);max-height:none;border-radius:12px;width:min(650px,calc(100vw - 32px))}
#editor form{display:flex;flex-direction:column;min-height:100%;position:relative}
.editor-header{display:flex;justify-content:space-between;align-items:center;padding:23px 28px;border-bottom:1px solid var(--line)}
.editor-header h2{font-size:23px}
.close-button{font-size:12px;min-height:44px;border-color:transparent}
.editor-hint{font-size:12px;color:var(--muted);padding:17px 28px 0}
.editor-body{padding:22px 28px;display:grid;grid-template-columns:1fr 1fr;gap:18px}
.editor-body>.field:first-child,.editor-body>.field:has(textarea),.editor-body>fieldset,.editor-body>section{grid-column:1/-1}
.editor-body>.field:first-child input{font-weight:700;font-size:16px}
.editor-body fieldset{min-width:0}
.type-choices{border:1px solid var(--line);padding:14px 16px;border-radius:7px}
.type-choices legend{font-size:14px;font-weight:700}
.checkbox{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px;overflow-wrap:anywhere}
.checkbox input{width:18px;height:18px;accent-color:var(--teal)}
.certification-section{margin-top:10px;border-top:1px solid var(--line);padding-top:20px}
.certification-section>.muted{font-size:12px;margin:7px 0 17px}
.certification-rows{display:grid;gap:16px;margin-bottom:16px}
.certification-editor{display:grid;grid-template-columns:1fr 1fr;gap:12px;border:1px solid var(--line);background:#fafbf8;border-radius:7px;padding:16px}
.certification-editor legend{font-size:12px;font-weight:700;color:var(--teal);padding:0 7px}
.certification-editor>.field:first-of-type{grid-column:1/-1}
.certification-editor button{justify-self:start;font-size:12px}
.dialog-actions{position:sticky;bottom:0;display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:auto;padding:18px 28px;background:var(--paper);border-top:1px solid var(--line);z-index:1}
.dialog-actions .danger-text{margin-inline-start:auto}
.error{padding:13px 16px;margin:12px 20px;background:#fff0eb;border:1px solid #e3b7ac;border-radius:6px;color:#8d3228;font-size:13px;overflow-wrap:anywhere}
.dialog-content{padding:28px}
.dialog-content>p{margin-top:14px}
.dialog-content .dialog-actions{padding:22px 0 0;margin-top:22px}
/* Authentication */
.auth{width:min(430px,calc(100% - 32px));margin:9vh auto;padding:34px;background:white;border:1px solid var(--line);border-radius:12px}
.auth .brand{padding:0 0 30px}
.auth .brand strong{color:var(--navy)}
.auth .brand small{color:var(--muted)}
.auth .brand-mark{color:var(--teal);border-color:#6e9b8e}
.auth h1{font-size:25px}
.auth>.muted{font-size:14px;margin:10px 0 28px}
.auth form{display:grid;gap:18px}
.auth form .muted{font-size:12px}
.auth .error{margin:0}
.privacy{border-top:1px solid var(--line);margin-top:26px;padding-top:18px;font-size:11px;color:var(--muted)}
.toast{position:fixed;bottom:22px;left:22px;z-index:10;max-width:calc(100vw - 44px);background:var(--navy);color:white;border-radius:8px;padding:15px 22px;box-shadow:0 8px 32px #162c3b20;font-size:14px}
.skip{position:fixed;top:-80px;right:10px;background:white;padding:12px;z-index:20;color:var(--teal)}
.skip:focus{top:8px}
.loading{padding:80px;text-align:center}
[hidden]{display:none!important}
@media(min-width:1600px){
  main#main{padding-top:48px}
  .filters{grid-template-columns:minmax(240px,1.6fr) repeat(4,minmax(120px,1fr))}
}
@media(max-width:1200px){
  .shell{grid-template-columns:195px minmax(0,1fr)}
  .sidebar{padding-inline:14px}
  main#main{padding:28px 25px 20px}
  .topbar{padding-inline:25px}
  .filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .search-field{grid-column:1/-1}
  .people-table th,.people-table td{padding:15px 13px}
  .people-table th:nth-child(1){width:29%}
  .people-table th:nth-child(3){width:40%}
  .people-table th:nth-child(4){width:16%}
}
@media(max-width:760px){
  .shell{display:block}
  .sidebar{height:auto;position:static;padding:16px 16px 0}
  .brand{padding:0 0 15px;gap:10px}
  .brand strong{font-size:21px}
  .brand-mark{width:35px;height:35px;font-size:23px}
  .brand small{font-size:11px}
  .nav-label,.sidebar-foot{display:none}
  .sidebar nav{flex-direction:row;overflow-x:auto;gap:4px;padding-bottom:11px}
  .sidebar nav button{font-size:12px;padding:9px 12px;min-height:44px;white-space:nowrap;flex-shrink:0}
  .topbar{height:56px;padding-inline:18px;font-size:11px}
  .topbar-separator{margin-inline:7px}
  .account{gap:8px}
  .account>span{max-width:80px;font-size:11px}
  main#main{padding:24px 16px 18px;min-height:calc(100dvh - 188px)}
  .page-heading{flex-direction:column;align-items:stretch;gap:20px;margin-bottom:22px}
  h1{font-size:29px}
  .page-heading>.actions{flex-direction:row-reverse;justify-content:flex-end}
  .page-heading>.actions>.primary{flex:1}
  .page-heading .muted{font-size:13px}
  .summary-line{gap:7px 18px;font-size:12px;padding:14px 0 18px}
  .summary-line>span:last-child{width:100%;font-size:11px}
  .filters{padding:14px;gap:12px 10px}
  .field>span{font-size:11px}
  .field input,.field select{font-size:13px;padding:10px 8px}
  .list-heading{margin-top:18px}
  .list-heading .actions{gap:6px}
  .list-heading button{padding:7px 9px;font-size:11px}
  .filters>.text-button,.list-heading button{min-height:44px}
  .people-table,.people-table tbody,.people-table tr,.people-table td{display:block}
  .people-table thead{display:none}
  .people-table tbody tr{padding:18px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto;gap:13px}
  .people-table tbody tr:last-child{border-bottom:0}
  .people-table td{padding:0;border:0;font-size:13px}
  .people-table td:first-child{grid-column:1/-1}
  .people-table td:nth-child(2){grid-column:1/-1;color:var(--muted);padding-inline-start:46px}
  .people-table td:nth-child(3){grid-column:1/-1;padding:13px 0;border-top:1px solid #edf0eb}
  .people-table td:last-child{grid-column:1/-1;justify-self:end}
  .cert-item{font-size:12px;gap:8px}
  .empty{min-height:270px;padding:35px 20px}
  .page-footer{font-size:10px;padding-top:30px}
  .catalog-row{padding:18px;align-items:start;gap:10px}
  .catalog-row button{font-size:11px;max-width:40%}
  .history-panel{padding:18px}
  .history-row{gap:12px;font-size:13px;flex-wrap:wrap}
  .history-row time{font-size:11px}
  .editor-header{padding:20px}
  .editor-hint{padding-inline:20px}
  .editor-body{padding:20px;gap:16px 12px}
  .editor-body>.field{grid-column:1/-1}
  .certification-editor{grid-template-columns:1fr;padding:12px}
  .certification-editor>.field{grid-column:1/-1}
  .dialog-actions{padding:16px 20px;gap:8px}
  .dialog-actions button{font-size:13px}
  .dialog-actions .danger-text{margin-inline-start:0}
  .auth{padding:27px;margin-top:6vh}
  .toast{bottom:16px;left:16px;max-width:calc(100vw - 32px);font-size:13px}
  #editor{width:100vw;margin:0;height:100dvh;border-radius:0;max-height:100dvh}
  dialog{max-height:calc(100dvh - 24px)}
  .dialog-content{padding:23px}
}
/* Overview is an Explore table; horizontal overflow stays inside the region. */
.accounts-form{display:grid;gap:18px}
.accounts-row{padding:20px;flex-wrap:wrap}
.accounts-management{min-width:0}
.accounts-management h2{overflow-wrap:anywhere}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.table-hint{font-size:12px;color:var(--muted);margin:0 0 12px}
.overview-panel{min-width:0;max-width:100%}
.overview-scroll{max-width:100%;overflow:auto;max-height:70vh;overscroll-behavior-inline:contain;scrollbar-color:#8aa49b #edf2ec}
.overview-table{width:100%;min-width:2100px;border-collapse:separate;border-spacing:0;text-align:right;font-size:13px}
.overview-table th,.overview-table td{padding:13px 15px;border-bottom:1px solid var(--line);vertical-align:top;min-width:115px;max-width:260px;overflow-wrap:anywhere;background:var(--paper)}
.overview-table thead th{position:sticky;top:0;z-index:2;background:#edf2ed;color:var(--muted);font-size:12px;font-weight:700;white-space:nowrap}
.overview-table th:first-child{position:sticky;inset-inline-start:0;min-width:150px;max-width:190px;z-index:1;box-shadow:-1px 0 0 var(--line)}
.overview-table thead th:first-child{z-index:3;background:#edf2ed}
.overview-table tbody tr:hover>*{background:#f4f8f3}
.overview-table .notes-cell{min-width:180px;white-space:pre-wrap}
.overview-table .date-cell{white-space:nowrap;font-variant-numeric:tabular-nums}
.overview-table .badge.none{background:#edf0f1;color:#586870}
.overview-empty{min-height:190px;padding:30px}
.person-overview-table{min-width:1180px}
.person-overview-table .overview-cert-cell{min-width:360px;max-width:440px}
.overview-cert-list{display:grid;gap:12px}
.overview-cert{padding:12px;border:1px solid var(--line);border-radius:7px;background:#fafbf8}
.overview-cert.filter-match{background:#edf6ee;border-color:#9abdab}
.overview-cert-title{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.overview-cert-title strong{font-size:13px}
.overview-cert .tags{margin-top:8px}
.overview-cert-dates{display:grid;gap:3px;margin-top:9px;font-size:11px;color:var(--muted)}
.overview-cert-dates time{display:inline-block;font-variant-numeric:tabular-nums}
.cert-notes{font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:7px}
.match-label{color:var(--teal);font-size:10px}
.overview-types{display:grid;gap:12px}
.overview-types strong{font-size:12px}
.advanced-filters{grid-column:1/-1;border-top:1px solid var(--line);padding-top:6px}
.advanced-filters summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;color:var(--teal);font-size:12px;font-weight:700}
.advanced-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-top:10px}
@media(max-width:760px){.advanced-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.overview-scroll{max-height:65vh}.overview-table th,.overview-table td{padding:12px}.overview-table th:first-child{min-width:135px;max-width:150px}.table-hint{font-size:11px}}
.cert-level-control{margin-top:10px;max-width:230px}
.cert-level-control>span{font-size:11px}
.cert-level-control select{min-height:44px;font-size:12px}
.cert-level{background:#e9eef5;color:#29485e}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
