:root {
  --portal-sidebar-width: 274px;
  --portal-ink: #333538;
  --portal-muted: #7a7c7e;
  --portal-line: #e5e7eb;
  --portal-gold: #f5b427;
}
[hidden] { display: none !important; }
body.portal-layout {
  padding-inline-start: var(--portal-sidebar-width);
  font-family: 'IBM Plex Sans Arabic', Tahoma, sans-serif;
  min-height: 100vh;
}
.portal-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--portal-sidebar-width);
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-inline-end: 1px solid var(--portal-line);
  border-top: 4px solid var(--portal-gold);
  box-shadow: -4px 0 24px rgb(51 53 56 / 3%);
  color: var(--portal-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.portal-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 22px 23px 17px;
  text-decoration: none;
  color: inherit;
}
.portal-brand img { width: 158px; height: 68px; object-fit: contain; margin-bottom: 9px; }
.portal-brand strong { font-size: 19px; font-weight: 600; }
.portal-brand small { font-size: 11px; color: var(--portal-muted); }
.portal-navigation { padding: 5px 13px 18px; flex: 1 0 auto; }
.portal-nav-group { padding-block: 13px 2px; }
.portal-nav-group h2 {
  margin: 0 11px 9px;
  font-size: 10px;
  font-weight: 600;
  color: var(--portal-muted);
}
.portal-nav-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 11px;
  margin-block: 3px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.65;
  text-decoration: none;
  color: var(--portal-ink);
  border: 1px solid transparent;
  border-radius: 7px;
  transition: background .16s ease, border-color .16s ease;
}
.portal-nav-link > .icon { width: 19px; height: 19px; flex: 0 0 19px; }
.portal-nav-link > span { flex: 1; min-width: 0; }
.portal-nav-link[aria-current='page'] { background: #fff7e5; border-color: #f3dfa9; color: #73521c; }
.portal-nav-link:not(.portal-nav-pending):hover { background: #f7f8fa; }
.portal-nav-link:focus-visible, .portal-menu-toggle:focus-visible, .portal-sidebar a:focus-visible {
  outline: 3px solid var(--portal-gold);
  outline-offset: 2px;
}
.portal-nav-pending { color: #909399; cursor: default; }
.portal-nav-pending small { font-size: 8px; white-space: nowrap; color: #909399; }
.portal-sidebar-account {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 6px 20px 0;
  border-top: 1px solid var(--portal-line);
  padding-block: 18px 10px;
}
.portal-avatar {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff3d6;
  color: #8a6424;
  font-size: 18px;
}
.portal-sidebar-account > div { flex: 1; min-width: 0; }
.portal-sidebar-account strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.portal-sidebar-account small { display: block; font-size: 10px; color: var(--portal-muted); }
.portal-sidebar-account > a { display: grid; place-items: center; padding: 5px; color: var(--portal-muted); }
.portal-public-link { display: flex; align-items: center; gap: 9px; margin: 0 24px 19px; font-size: 10px; color: var(--portal-muted); text-decoration: none; }
.portal-public-link .icon { width: 14px; height: 14px; }
.portal-menu-toggle, .portal-menu-backdrop { display: none; }
body.portal-layout .header-inner,
body.portal-layout .landing-header-inner { padding-inline: 26px; }
body.portal-layout .staff-nav,
body.portal-layout .company-nav,
body.portal-layout .app-nav { display: none; }
body.portal-layout :is(.workspace, .landing-shell.staff-main) { max-width: 1260px; width: 100%; }
body.portal-layout .staff-intro h1 { font-size: clamp(30px, 4vw, 46px); }
body.portal-layout .staff-account { flex-basis: 260px; }

@media (max-width: 1080px) {
  :root { --portal-sidebar-width: 250px; }
  .portal-nav-link { font-size: 11px; }
  body.portal-layout .staff-intro { flex-direction: column; align-items: stretch; }
  body.portal-layout .staff-account { flex-basis: auto; }
}
@media (max-width: 800px) {
  body.portal-layout { padding-inline-start: 0; padding-top: 50px; }
  .portal-sidebar {
    width: min(290px, 86vw);
    transform: translateX(105%);
    transition: transform .2s ease;
    z-index: 1100;
  }
  .portal-sidebar.is-open { transform: translateX(0); }
  .portal-menu-toggle {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    inset-block-start: 0;
    inset-inline: 0;
    width: 100%;
    min-height: 50px;
    padding: 10px 18px;
    border: 0;
    border-bottom: 1px solid var(--portal-line);
    background: #fff;
    color: var(--portal-ink);
    font: 500 12px/1.6 'IBM Plex Sans Arabic', Tahoma, sans-serif;
    z-index: 1000;
    cursor: pointer;
  }
  .portal-menu-toggle .icon { width: 20px; height: 20px; }
  .portal-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: rgb(25 30 38 / 35%);
    z-index: 1050;
  }
  body.portal-menu-open { overflow: hidden; }
  body.portal-layout .header-inner, body.portal-layout .landing-header-inner { padding-inline: 16px; }
}
@media print {
  body.portal-layout { padding: 0 !important; background: #fff; }
  .portal-sidebar, .portal-menu-toggle, .portal-menu-backdrop { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-sidebar, .portal-nav-link { transition: none; }
}

body.portal-layout header nav[aria-label='التنقل الرئيسي'],
body.portal-layout .contract-nav,
body.portal-layout .employee-nav { display: none; }

.portal-notification-panel { margin-block: 28px; padding: 24px; border: 1px solid var(--portal-line); border-radius: 12px; background: #fff; }
.portal-notification-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.portal-notification-heading h2 { font-size: 20px; font-weight: 600; }
.portal-notification-heading p { max-width: 650px; margin-top: 6px; font-size: 12px; color: var(--portal-muted); }
.portal-notification-status { margin-block: 14px; font-size: 12px; color: var(--portal-ink); }
.portal-notification-table-wrap { overflow-x: auto; }
.portal-notification-panel table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: right; }
.portal-notification-panel th { background: #f7f8fa; font-weight: 500; }
.portal-notification-panel td, .portal-notification-panel th { padding: 12px; border-bottom: 1px solid var(--portal-line); }
.portal-notification-panel td small { display: block; color: #a06d22; font-size: 10px; margin-top: 4px; }
.portal-notification-empty { font-size: 12px; color: var(--portal-muted); padding-block: 10px; }
@media (max-width: 650px) { .portal-notification-panel { padding: 17px; } .portal-notification-heading { flex-direction: column; } }

.portal-notice-compose { border-top: 1px solid var(--portal-line); margin-top: 24px; padding-top: 20px; display: grid; gap: 12px; max-width: 740px; }
.portal-notice-compose h3 { font-size: 17px; font-weight: 500; }
.portal-notice-compose > p { font-size: 12px; color: var(--portal-muted); }
.portal-notice-compose label { display: grid; gap: 7px; font-size: 12px; }
.portal-notice-compose select[multiple] { min-height: 130px; }
.portal-notice-compose input, .portal-notice-compose textarea, .portal-notice-compose select { width: 100%; font: inherit; border: 1px solid var(--portal-line); border-radius: 6px; padding: 10px; }
.portal-notice-compose > button { justify-self: start; }
