/* HR module: requests and approvals, announcements and policies (rq-), and the employee's portal (ess-). */

/* ---------------------------------------------------------------- the desk: requests */
.rq-wrap { overflow-x: auto; }
/* inside a scrolling box the office's sticky headers would float mid-table */
.rq-wrap table.grid th, .rq-tbl-wrap th, .ess-attw table.grid th { position: static; }
.rq-table td { vertical-align: middle; }
.rq-table tr.rq-mine td { background: #fbf6e6; }
.rq-table tr.rq-mine td:first-child { box-shadow: inset -3px 0 0 var(--ui-gold-2); }
[dir=ltr] .rq-table tr.rq-mine td:first-child { box-shadow: inset 3px 0 0 var(--ui-gold-2); }
.rq-n { display: inline-block; min-width: 18px; padding: 0 6px; margin-inline-start: 4px; border-radius: 99px; background: var(--ui-gold); color: #26231f; font-size: 11px; line-height: 18px; }
.btn.primary .rq-n { background: var(--ui-gold); }
.rq-ty { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rq-ty i { font-style: normal; width: 22px; height: 22px; border-radius: 6px; background: #26231f; color: var(--ui-gold); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.rq-at { font-size: 11.5px; color: var(--ui-ink-2); }
.rq-lock { color: var(--ui-muted); font-size: 12px; white-space: nowrap; }
.rq-head { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 14px; flex-wrap: wrap; background: linear-gradient(90deg, var(--ui-card), #f5efdc); }
.rq-head h1 { font-family: var(--ui-serif); font-size: 26px; margin: 4px 0 6px; line-height: 1.2; }
.rq-hi { width: 56px; height: 56px; border-radius: 14px; background: #26231f; color: var(--ui-gold); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.rq-who { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; }
.rq-grid > .card { padding: 16px 18px; }
.rq-grid > .card.wide { grid-column: 1 / -1; }
.rq-decide { border-color: var(--ui-gold-2); box-shadow: 0 0 0 1px var(--ui-gold) inset; }
.rq-cmt { margin: 6px 0 0; padding: 6px 10px; background: #f6f1e1; border-radius: 8px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; }
.rq-items th, .rq-items td { font-size: 12px; padding: 6px 8px; position: static; }
.rq-diff th { position: static; }
table.kv td .rq-items { margin-top: 2px; }

/* the chain: black when decided, gold where it waits, paper for what is still ahead */
.rq-chain { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.rq-chain li { display: flex; gap: 12px; padding: 8px 0 12px; position: relative; }
.rq-chain li:not(:last-child)::after { content: ''; position: absolute; top: 38px; bottom: -4px; inset-inline-start: 14px; width: 2px; background: #e4dab8; }
.rq-chain li > i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 14px; background: #fffdf8; border: 1.5px solid var(--ui-line-2); color: var(--ui-muted); z-index: 1; }
.rq-chain li > div { flex: 1; min-width: 0; }
.rq-chain li b { font-size: 13.5px; }
.rq-chain .rq-s-approved > i { background: #26231f; border-color: #26231f; color: var(--ui-gold); }
.rq-chain .rq-s-rejected > i { background: var(--ui-bad); border-color: var(--ui-bad); color: #fff; }
.rq-chain .rq-s-returned > i { background: var(--ui-warn-bg); border-color: var(--ui-warn); color: var(--ui-warn); }
.rq-chain .rq-s-skipped { opacity: .6; }
.rq-chain li.now > i { background: var(--ui-gold); border-color: var(--ui-gold-2); color: #26231f; box-shadow: 0 0 0 4px rgba(189, 183, 151, .3); }
.rq-chain li.now b { color: #6d6641; }

/* the form of a request */
.rq-new { padding: 18px 20px; }
.rq-types { display: flex; flex-wrap: wrap; gap: 6px; }
.rq-tb { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ui-line-2); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.rq-tb i { font-style: normal; color: var(--ui-gold-2); }
.rq-tb.on { background: #26231f; border-color: #26231f; color: #f4eedc; }
.rq-tb.on i { color: var(--ui-gold); }
.rq-form { margin-top: 6px; }
.rq-form input[type=month] { width: 100%; border: 1px solid var(--ui-line-2); border-radius: 8px; padding: 8px 10px; background: #fff; outline: none; font-size: 14px; direction: ltr; text-align: right; }
.rq-form input[type=month]:focus { border-color: var(--ui-gold-2); box-shadow: 0 0 0 3px rgba(189, 183, 151, .25); }
.rq-calc { padding: 8px 10px; border-radius: 8px; background: #f6f1e1; min-height: 38px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rq-tbl-wrap { overflow-x: auto; }
.rq-tbl { min-width: 460px; }
.rq-tbl + .btn, .rq-tbl-wrap + .btn { margin-top: 6px; align-self: flex-start; }
.rq-set-t th { width: 42%; }
.rq-set-t td { border-bottom: 1px dashed var(--ui-line); }
.rq-now { font-weight: 400; margin-top: 2px; }

/* on the dashboard */
.rq-wfig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ui-line); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.rq-wfig a { background: #fbf8ef; padding: 10px 8px; text-align: center; text-decoration: none; display: flex; flex-direction: column; }
/* «تنتظر قرارك» is dark only when something waits for a decision: a black zero drew the eye to nothing. */
.rq-wfig a.on:first-child { background: #26231f; }
.rq-wfig a.on:first-child b { color: #f4eedc; }
.rq-wfig a.on:first-child span { color: var(--ui-gold); }
.rq-wfig b { font-family: var(--ui-serif); font-size: 24px; line-height: 1.1; }
.rq-wfig span { font-size: 11px; color: var(--ui-ink-2); }
.rq-wl li a { display: block; }
.rq-tab { padding: 16px 18px; }

/* announcements */
.rq-anns { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.rq-ann { padding: 14px 16px; }
.rq-ann.pinned { border-color: var(--ui-gold-2); background: linear-gradient(180deg, #fbf6e6, var(--ui-card)); }
.rq-ann-t { font-family: var(--ui-serif); font-size: 17px; }
.rq-ann-b { margin: 8px 0 0; line-height: 1.7; font-size: 13.5px; }

/* ---------------------------------------------------------------- the employee's portal, over the office */
body.ess-on { background: #f4eedc; --top-h: 0px; }
body.ess-on #app > .top { display: none; }
body.ess-on #app > main { max-width: none; padding: 0; margin: 0; }
.ess { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #f4eedc; color: #26231f; }
.ess-top { position: sticky; top: 0; z-index: 30; background: #26231f; color: #f4eedc; box-shadow: 0 2px 0 var(--ui-gold-2); }
.ess-bar { display: flex; align-items: center; gap: 12px; max-width: 1080px; margin: 0 auto; padding: 10px 20px; }
.ess-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.ess-brand img { height: 34px; }
.ess-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.ess-brand b { font-family: var(--ui-serif); font-size: 20px; color: #f6f1e3; }
.ess-brand small { font-family: 'Courier Prime', monospace; font-size: 9.5px; letter-spacing: .16em; color: var(--ui-gold); }
.ess-who { display: flex; flex-direction: column; line-height: 1.25; text-align: end; }
.ess-who b { font-size: 13.5px; }
.ess-who small { font-size: 11px; color: var(--ui-gold); }
.ess-out { background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #e9e2cc; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px; }
.ess-out:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ess-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; background: #2f2b26; padding: 6px max(12px, calc((100% - 1080px) / 2 + 12px)); }
.ess-nav::-webkit-scrollbar { display: none; }
.ess-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: #d9d3c3; text-decoration: none; white-space: nowrap; font-size: 14px; }
.ess-nav a i { font-style: normal; color: var(--ui-gold); }
.ess-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ess-nav a.on { background: rgba(189, 183, 151, .18); color: #fff; box-shadow: inset 0 -2px 0 var(--ui-gold); }
.ess-nav a b { background: var(--ui-gold); color: #26231f; border-radius: 99px; font-size: 11px; padding: 0 6px; line-height: 17px; }
.ess-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 22px 20px 36px; }
.ess-foot { text-align: center; font-size: 11.5px; color: #8d877c; padding: 14px 16px 22px; }
.ess-card { background: #fffdf8; border: 1px solid #e3ded2; border-radius: 14px; padding: 16px 18px; }
.ess-card.empty { padding: 30px; }
.ess-card h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; font-family: var(--ui-serif); font-size: 19px; }
.ess-card h2 small { font-family: var(--ui-font); font-size: 12px; color: var(--ui-muted); font-weight: 400; }
.ess-card h2 a { margin-inline-start: auto; font-family: var(--ui-font); font-weight: 400; color: var(--ui-gold-2); }
.ess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.ess-grid > .wide { grid-column: 1 / -1; }
.ess-h { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; font-family: var(--ui-serif); font-size: 28px; line-height: 1.25; }
.ess-hi { flex: none; width: 42px; height: 42px; border-radius: 11px; background: #26231f; color: var(--ui-gold); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 19px; }
.ess-sub { margin: 0 0 16px; color: var(--ui-ink-2); line-height: 1.6; }
.ess-hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ess-sec { font-family: var(--ui-serif); font-size: 18px; margin: 18px 0 8px; }
.ess-crumb { display: inline-block; font-size: 13px; color: var(--ui-gold-2); text-decoration: none; margin-bottom: 4px; }
.ess-wide { width: 100%; }
.ess-gold { color: var(--ui-gold); }
.ess-ok { color: var(--ui-ok); margin-top: 6px; }
.ess-warn { color: var(--ui-warn); margin-top: 6px; }
.ess-acts { margin-top: 14px; }
.ess table.grid th { position: static; }
.ess .banner { margin-top: 12px; }

/* the employee's card: the House's black, with its gold */
.ess-id { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 16px; align-items: center; background: linear-gradient(135deg, #26231f, #3b352c); color: #f4eedc; border: 0; box-shadow: inset 0 -3px 0 var(--ui-gold-2); }
.ess-id h1 { margin: 2px 0 0; font-family: var(--ui-serif); font-size: 27px; line-height: 1.2; }
.ess-id .muted { color: #b9b29a; }
.ess-id-t { margin-top: 4px; color: #e7e0c9; font-size: 14px; }
.ess-av { width: 64px; height: 64px; border-radius: 50%; background: var(--ui-gold); color: #26231f; display: flex; align-items: center; justify-content: center; font-family: var(--ui-serif); font-size: 30px; }
.ess-id .numtag { background: rgba(189, 183, 151, .2); color: #f4eedc; }
.ess-id .numtag small { color: var(--ui-gold); }
.ess-kv { grid-column: 1 / -1; margin-top: 4px; }
.ess-id table.kv th { color: var(--ui-gold); }
.ess-id table.kv td { border-bottom-color: rgba(255, 255, 255, .12); }
.ess-id table.kv .numtag { margin: 0 4px; }

.ess-bal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #e3ded2; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.ess-bal > div { background: #fbf8ef; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; }
.ess-bal b { font-family: var(--ui-serif); font-size: 22px; }
.ess-bal span { font-size: 11px; color: var(--ui-ink-2); }
.ess-bal .big { background: #26231f; }
.ess-bal .big b { color: #f4eedc; font-size: 28px; }
.ess-bal .big span { color: var(--ui-gold); }
.ess-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ess-quick a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border-radius: 11px; background: #f4eedc; text-decoration: none; font-size: 12.5px; text-align: center; line-height: 1.4; border: 1px solid transparent; }
.ess-quick a:hover { border-color: var(--ui-gold-2); }
.ess-quick i { font-style: normal; font-size: 20px; color: var(--ui-gold-2); }

.ess-clockrow { margin-top: 14px; }
.ess-clockrow:empty { display: none; }
.ess-clockcard { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ess-now { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.ess-now b { font-family: var(--ui-serif); font-size: 34px; line-height: 1.1; direction: ltr; text-align: start; }
.ess-now span { font-size: 12.5px; color: var(--ui-ink-2); }
.ess-clock-btns { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 260px; }
.ess-clock { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 15px; border: 0; border-radius: 14px; background: var(--ui-gold); color: #26231f; font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer; box-shadow: inset 0 -3px 0 var(--ui-gold-2); }
.ess-clock.alt { background: #f4eedc; box-shadow: inset 0 0 0 1px #d8cb9f; font-weight: 600; }
.ess-clock i { font-style: normal; font-size: 20px; }
.ess-clock:disabled { opacity: .6; cursor: default; }
.ess-month { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 10px; }
.ess-month b { font-family: var(--ui-serif); font-size: 18px; }
.ess-tfig { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: #e3ded2; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.ess-tfig > div { background: #fffdf8; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; }
.ess-tfig > div:first-child { background: #26231f; }
.ess-tfig > div:first-child b { color: #f4eedc; }
.ess-tfig > div:first-child span { color: var(--ui-gold); }
.ess-tfig b { font-family: var(--ui-serif); font-size: 22px; }
.ess-tfig span { font-size: 11px; color: var(--ui-ink-2); }
.ess-attw { overflow-x: auto; padding: 6px; }

.ess-reqs { display: flex; flex-direction: column; gap: 8px; }
.ess-req { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #e3ded2; border-radius: 11px; background: #fff; text-decoration: none; }
.ess-req:hover { border-color: var(--ui-gold-2); }
.ess-req .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ess-req-i { flex: none; width: 38px; height: 38px; border-radius: 10px; background: #26231f; color: var(--ui-gold); display: flex; align-items: center; justify-content: center; }
.ess-req-s { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: end; }
.ess-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ess-type { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 14px; border-radius: 13px; background: #fffdf8; border: 1px solid #e3ded2; text-decoration: none; }
.ess-type:hover { border-color: var(--ui-gold-2); box-shadow: 0 4px 16px rgba(33, 31, 28, .08); }
.ess-type i { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 11px; background: #26231f; color: var(--ui-gold); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 19px; }
.ess-type b { font-size: 15px; }
.ess-type span { font-size: 12px; color: var(--ui-ink-2); line-height: 1.5; }
.ess-form { max-width: 760px; }

.ess-slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ess-net { display: flex; align-items: baseline; gap: 8px; padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; background: #26231f; color: #f4eedc; }
.ess-net span { font-size: 12px; color: var(--ui-gold); }
.ess-net b { font-family: var(--ui-serif); font-size: 26px; margin-inline-start: auto; }
.ess-net small { color: var(--ui-gold); }
.ess-slip .btn { margin-top: 10px; }

.ess-ann { padding: 12px 0; border-bottom: 1px dashed #e3ded2; }
.ess-ann:last-child { border-bottom: 0; }
.ess-ann h3 { margin: 2px 0 4px; font-family: var(--ui-serif); font-size: 18px; }
.ess-ann p { margin: 0; line-height: 1.75; }
.ess-ann.pinned h3 { color: #6d6641; }
.ess-pols { display: flex; flex-direction: column; gap: 10px; }
.ess-pol { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ess-pol h2 { margin-bottom: 2px; }
.ess-pol-a { display: flex; gap: 8px; flex-wrap: wrap; }
.ess-att td { font-size: 13px; }

/* the door */
.ess-door { background: radial-gradient(circle at 50% 0%, #3b352c, #26231f 62%); color: #f4eedc; justify-content: center; padding: 28px 16px; }
.ess-door-in { width: 100%; max-width: 400px; margin: auto; text-align: center; }
.ess-emblem { height: 96px; }
.ess-door h1 { margin: 12px 0 2px; font-family: var(--ui-serif); font-size: 34px; }
.ess-en { font-family: 'Courier Prime', monospace; font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--ui-gold); }
.ess-door-box { margin-top: 22px; padding: 20px 20px 16px; border-radius: 16px; background: #fffdf8; color: #26231f; text-align: start; box-shadow: 0 20px 60px rgba(0, 0, 0, .35), inset 0 3px 0 var(--ui-gold); }
.ess-door-box input { font-size: 18px; padding: 11px 12px; letter-spacing: .08em; text-align: center; }
.ess-door-box .btn { padding: 11px; font-size: 15px; }
.ess-note { margin: 12px 0 0; line-height: 1.7; }
.ess-back { display: inline-block; margin-top: 16px; color: var(--ui-gold); font-size: 13px; }
.ess-way { font-family: var(--ui-serif); font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.ess-alt { display: block; width: 100%; margin-top: 12px; padding: 6px; background: none; border: 0; color: var(--ui-gold-2); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ess-door .ess-back.ess-alt { width: auto; margin: 16px auto 0; color: var(--ui-gold); }

@media (max-width: 760px) {
  .rq-grid { grid-template-columns: 1fr; }
  .rq-who { align-items: flex-start; }
  .ess-bar { padding: 8px 14px; gap: 8px; }
  .ess-brand small, .ess-who small { display: none; }
  .ess-brand b { font-size: 17px; }
  .ess-main { padding: 16px 14px 28px; }
  .ess-grid { grid-template-columns: 1fr; }
  .ess-id { grid-template-columns: auto 1fr; }
  .ess-id-no { grid-column: 1 / -1; }
  .ess-h { font-size: 23px; }
  .ess-bal { grid-template-columns: repeat(2, 1fr); }
  .ess-req { flex-wrap: wrap; }
  .ess-req-s { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .ess-pol-a { width: 100%; }
  .ess-tfig { grid-template-columns: repeat(3, 1fr); }
  .ess-tfig > div:last-child { grid-column: span 2; }
  .ess-clockcard { flex-direction: column; align-items: stretch; }
  .ess-clock-btns { flex: none; min-width: 0; width: 100%; }
  .ess-clock { padding: 13px 8px; font-size: 15px; }
  .ess-pol-a .btn { flex: 1; }
}
@media print { body.ess-on #app { display: none !important; } }

/* 2026-10-24: on a phone the filters sit two by two at equal width, the search under them across the row. */
@media (max-width: 760px) {
  .rq-tools > .seg { flex: 1 1 100%; }
  .rq-tools > select { flex: 1 1 calc(50% - 8px); min-width: 0; width: auto; }
  .rq-tools > .grow { display: none; }
  .rq-tools > input[type=search] { flex: 1 1 100%; }
}
.rq-tools > input[type=search] { min-width: 220px; }

/* ---------------------------------------------------------------- 2026-10-24 (second review) */
/* The employee portal's door: the language switch, as in the office's own top bar. */
.ess-door-in { position: relative; }
.ess-door .ess-lang { position: absolute; top: -8px; inset-inline-end: 0; background: none; border: 1px solid #4a443a; color: #d9d3c3; border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ess-door .ess-lang:hover { border-color: var(--ui-gold); color: #fff; }
