/* ============================================
   SKYFLIX — دفتر الدوام (الهوية الداكنة)
   خلفية كحلية داكنة #0C1424 · أحمر سكاي فليكس #E50914
   بطاقات #121D33 · نص فاتح · أخضر مداوم #2BC48A
============================================ */
:root {
  --bg: #0C1424;
  --card: #121D33;
  --card-2: #0F1930;
  --line: #24314D;
  --ink: #EDF1F7;
  --ink-soft: #93A1B8;
  --red: #E50914;
  --red-soft: #FF4D55;
  --green: #2BC48A;
  --gold: #D4A63F;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  background:
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(255,255,255,.025) 34px 35px),
    radial-gradient(1200px 500px at 80% -10%, rgba(229,9,20,.12), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; width: min(860px, 94%); margin: 24px auto; }

/* ---------- الترويسة + شعار سكاي فليكس ---------- */
.top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 12px 5%; background: #0A101D;
  border-bottom: 3px solid var(--red);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-box {
  font-family: 'Alexandria', sans-serif; font-weight: 800; letter-spacing: 1px;
  color: var(--red); border: 3px solid var(--red); padding: 3px 10px 4px;
  font-size: 1.05rem; line-height: 1;
}
.brand-sub { color: var(--ink); font-weight: 700; font-size: 1.05rem; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; }
.top nav a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: .95rem; }
.top nav a:hover, .top nav a:focus-visible { background: rgba(229,9,20,.16); }
footer { text-align: center; color: var(--ink-soft); font-size: .85rem; padding: 18px; }

/* ---------- بطاقة التحضير ---------- */
.punch {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 26px; text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.punch::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 6px; }
.punch.in::before { background: var(--green); }
.punch.out::before { background: var(--red); }
.eyebrow { color: var(--ink-soft); letter-spacing: .5px; margin: 0 0 6px; }
.clock {
  font-family: 'Alexandria', sans-serif; font-weight: 800;
  font-size: clamp(3rem, 12vw, 5rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.status { color: var(--ink-soft); margin: 10px 0 24px; }
.status b { color: var(--ink); }

/* أزرار الختم — ثلاثية الأبعاد: وجه مائل بمنظور + جسم بارز ينغرز عند الضغط */
.actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; perspective: 700px; }
.stamp {
  --side: #12805a; --side2: #0b5e41; --glow: rgba(43,196,138,.35);
  font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 1.15rem; color: #fff;
  padding: 17px 34px; border-radius: 16px; border: 0; cursor: pointer;
  transform: rotateX(12deg);
  transition: transform .13s ease, box-shadow .13s ease, opacity .2s, filter .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  text-shadow: 0 2px 3px rgba(0,0,0,.35);
  background: linear-gradient(180deg, #3ad8a0 0%, #2BC48A 45%, #1a9165 100%);
  box-shadow:
    0 8px 0 var(--side), 0 11px 0 var(--side2),
    0 15px 12px rgba(0,0,0,.38), 0 26px 40px var(--glow),
    inset 0 2px 1px rgba(255,255,255,.45), inset 0 -5px 10px rgba(0,0,0,.25);
}
.stamp.red {
  --side: #8a070e; --side2: #5e0509; --glow: rgba(229,9,20,.32);
  background: linear-gradient(180deg, #ff5a63 0%, #E50914 50%, #a1060d 100%);
}
.stamp:not(:disabled):hover {
  transform: rotateX(12deg) translateY(-3px);
  box-shadow:
    0 11px 0 var(--side), 0 14px 0 var(--side2),
    0 19px 15px rgba(0,0,0,.42), 0 32px 48px var(--glow),
    inset 0 2px 1px rgba(255,255,255,.5), inset 0 -5px 10px rgba(0,0,0,.25);
}
.stamp:not(:disabled):active {
  transform: rotateX(16deg) translateY(8px);
  box-shadow:
    0 1px 0 var(--side2), 0 3px 5px rgba(0,0,0,.35), 0 9px 18px var(--glow),
    inset 0 3px 6px rgba(0,0,0,.3);
}
.stamp:disabled {
  opacity: .32; cursor: not-allowed; filter: saturate(.35);
  box-shadow: 0 3px 0 rgba(0,0,0,.4), 0 6px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12);
}
.s-ic { font-size: 1.25rem; }

/* ---------- اللوحات والجداول ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin-top: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.panel.narrow { max-width: 430px; margin-inline: auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1 { font-family: 'Alexandria', sans-serif; font-size: 1.5rem; margin: 0 0 12px; }
h2 { font-family: 'Alexandria', sans-serif; font-size: 1.1rem; margin: 6px 0 12px; }
h3.day { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--red); padding-bottom: 6px; margin: 22px 0 0; font-size: 1rem; }
h3.day small { color: var(--gold); font-weight: 700; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th { text-align: right; font-size: .82rem; color: var(--ink-soft); font-weight: 500; padding: 8px 6px; }
td { padding: 10px 6px; border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.live { color: var(--green); font-weight: 700; }
.total { margin-top: 16px; padding-top: 12px; border-top: 2px solid var(--red); }
.empty { color: var(--ink-soft); background: var(--card-2); border: 1px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; }

/* ---------- لوحة المدير: المتابعة الحية ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 6px; }
.emp {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px; position: relative;
}
.emp .name { font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 1.1rem; }
.emp .state { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-soft); flex: none; }
.emp.on { border-color: rgba(43,196,138,.55); box-shadow: 0 0 0 1px rgba(43,196,138,.25), 0 10px 24px rgba(0,0,0,.3); }
.emp.on .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(43,196,138,.6); animation: pulse 1.8s infinite; }
.emp.on .state { color: var(--green); }
.emp.off .state { color: var(--ink-soft); }
.emp .meta { color: var(--ink-soft); font-size: .9rem; }
.emp .meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(43,196,138,.55); }
  70% { box-shadow: 0 0 0 12px rgba(43,196,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,196,138,0); }
}
.updated { color: var(--ink-soft); font-size: .8rem; margin-top: 10px; }

/* ---------- الشارات ---------- */
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: .9rem; margin: 3px 0; border: 1.5px solid; }
.badge.green { color: var(--green); border-color: var(--green); background: rgba(43,196,138,.1); }
.badge.gray  { color: var(--ink-soft); border-color: var(--line); background: var(--card-2); }
.badge.gold  { color: var(--gold); border-color: var(--gold); background: rgba(212,166,63,.1); font-weight: 700; }

/* ---------- النماذج ---------- */
label { display: block; margin: 14px 0; font-weight: 500; }
input, select {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: 8px; font: inherit;
  background: var(--card-2); color: var(--ink);
}
input::placeholder { color: var(--ink-soft); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
select option { background: var(--card-2); color: var(--ink); }
.inline { display: inline-flex; gap: 8px; align-items: center; }
.inline input, .inline select { width: auto; margin: 0; padding: 8px 10px; }
.filters { flex-wrap: wrap; }
button.primary {
  width: 100%; margin-top: 8px; padding: 14px; border: 0; border-radius: 10px;
  background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
button.primary:hover { background: #C40812; }
.ghost, .ghost.btn {
  background: transparent; border: 1.5px solid currentColor; color: inherit;
  border-radius: 8px; padding: 7px 12px; font: inherit; cursor: pointer; text-decoration: none;
}
.top .ghost { color: var(--ink); }

/* حقل كلمة المرور مع زر الإظهار */
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 52px; }
.pw-eye {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--ink-soft); cursor: pointer;
  font-size: .85rem; padding: 6px; font-family: inherit;
}
.pw-eye:hover { color: var(--ink); }

/* ---------- تسجيل الدخول ---------- */
.login-card { max-width: 420px; margin: 7vh auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.login-card .logo-box { font-size: 1.5rem; display: inline-block; margin-bottom: 14px; }
.login-card h1 { font-size: 1.6rem; line-height: 1.35; }
.login-card em { font-style: normal; color: var(--red-soft); }
.hint { color: var(--ink-soft); font-size: .85rem; margin-top: 10px; }

/* ---------- التنبيهات ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; }
.flash.ok  { background: rgba(43,196,138,.12); color: var(--green); border: 1.5px solid var(--green); }
.flash.err { background: rgba(229,9,20,.12);  color: var(--red-soft); border: 1.5px solid var(--red); }

@media (prefers-reduced-motion: reduce) { .stamp { transition: none; } .emp.on .dot { animation: none; } }
@media (max-width: 480px) {
  .top { justify-content: center; text-align: center; }
  .actions form { width: 100%; }
  .stamp { width: 100%; }
}

/* بطاقة رسالة اليوم التحفيزية */
.motivate { position: relative; background: linear-gradient(135deg, var(--card) 0%, #182642 100%); border: 1px solid var(--line); border-inline-start: 4px solid var(--red); border-radius: 14px; padding: 22px 26px 18px; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); overflow: hidden; animation: mIn .5s ease; }
.m-quote { position: absolute; inset-inline-end: 14px; top: -6px; font-size: 4.5rem; color: rgba(229,9,20,.18); font-family: serif; line-height: 1; }
.m-greet { margin: 0 0 6px; color: var(--gold); font-weight: 700; font-size: .95rem; }
.m-body { margin: 0; font-family: 'Alexandria', sans-serif; font-weight: 600; font-size: 1.15rem; line-height: 1.8; color: var(--ink); }
.m-label { display: inline-block; margin-top: 12px; font-size: .78rem; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
@keyframes mIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .motivate { animation: none; } }

/* ---------- البريك المدفوع (٢٠ دقيقة) ---------- */
.break-row { margin-top: 14px; }
.stamp.break {
  --side: #8a6a1e; --side2: #6b520f; --glow: rgba(212,166,63,.28);
  background: linear-gradient(180deg, #e7c46a 0%, #D4A63F 50%, #a87f22 100%);
  color: #241a05; text-shadow: 0 1px 1px rgba(255,255,255,.25);
  font-size: 1rem; padding: 13px 26px;
}
.stamp.break.used {
  opacity: .35; box-shadow: none; cursor: not-allowed; font-size: .9rem;
  transform: none; background: var(--card-2); color: var(--ink-soft); text-shadow: none;
}
.break-live {
  width: 100%; background: var(--card-2); border: 1.5px solid var(--gold); border-radius: 12px;
  padding: 18px; text-align: center; animation: mIn .4s ease;
}
.break-title { margin: 0 0 6px; color: var(--gold); font-weight: 700; }
.break-timer {
  font-family: 'Alexandria', sans-serif; font-weight: 800; color: var(--gold);
  font-size: clamp(2.4rem, 10vw, 4rem); line-height: 1.1; font-variant-numeric: tabular-nums;
  direction: ltr;
}
.break-hint { color: var(--ink-soft); font-size: .85rem; margin: 6px 0 12px; }
.break-early { color: var(--ink); }
.break-live form { display: inline-block; }
.hidden-form { display: none !important; }
.break-over { border-color: var(--green); animation: breakGlow 1.2s ease infinite alternate; }
.break-over .break-timer { color: var(--green); font-size: clamp(1.6rem, 7vw, 2.4rem); }
@keyframes breakGlow { from { box-shadow: 0 0 0 0 rgba(43,196,138,.0); } to { box-shadow: 0 0 24px 2px rgba(43,196,138,.35); } }
.paid-note { color: var(--ink-soft); font-weight: 400; font-size: .8rem; margin-inline-start: 8px; }
/* مؤشر البريك في لوحة المدير */
.break-badge {
  color: var(--gold); background: rgba(212,166,63,.12); border: 1px solid var(--gold);
  border-radius: 8px; padding: 6px 10px; font-size: .88rem; font-weight: 700;
}
.break-badge b { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .break-live, .break-over { animation: none; } }

/* ---------- سجل محاولات الدخول ---------- */
.badge.red { color: var(--red-soft); border-color: var(--red); background: rgba(229,9,20,.1); }
tr.row-ok  { background: rgba(43,196,138,.05); }
tr.row-fail{ background: rgba(229,9,20,.06); }
.ghost.btn.active { color: var(--gold); border-color: var(--gold); background: rgba(212,166,63,.1); }

/* ============================================
   لوحة المدير v2 — مؤشرات وبطاقات حية
============================================ */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 16px; }
.kpi { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--kc, var(--line)); }
.kpi .v { font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--kc, var(--ink)); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--ink-soft); font-size: .82rem; }
.kpi.g { --kc: var(--green); }
.kpi.d { --kc: var(--gold); }

.emp-head { display: flex; align-items: center; gap: 12px; }
.ava {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 1.2rem;
  background: var(--card); border: 2.5px solid var(--line); color: var(--ink-soft);
}
.emp.on .ava { border-color: var(--green); color: var(--green); animation: pulse 2s infinite; }
.ava.boss, .emp.on .ava.boss { border-color: var(--gold); color: var(--gold); }
.livemin { display: flex; align-items: baseline; gap: 8px; }
.lm { font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 1.45rem; font-variant-numeric: tabular-nums; direction: ltr; }
.emp.on .lm { color: var(--green); }
.lm-cap { color: var(--ink-soft); font-size: .78rem; }
.shiftbar { height: 7px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.sb { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), #5fd9ac); transition: width .8s ease; }
.bar-l { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: .74rem; margin-top: -3px; }
.week { display: flex; gap: 5px; align-items: flex-end; height: 34px; }
.week i { flex: 1; border-radius: 3px 3px 0 0; background: rgba(147,161,184,.35); min-height: 3px; }
.week i.hi { background: var(--green); }
.week i.now { background: var(--gold); }

/* شريط أحداث اليوم */
.tl { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.tl h3 { font-family: 'Alexandria', sans-serif; font-weight: 600; font-size: .95rem; margin: 0 0 8px; color: var(--ink-soft); }
.ev { display: flex; gap: 10px; align-items: center; padding: 5px 0; font-size: .9rem; }
.ev .t { color: var(--ink-soft); font-variant-numeric: tabular-nums; min-width: 64px; }
.ev .ic { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ev .ic.in { background: var(--green); }
.ev .ic.out { background: var(--red-soft); }
.ev .ic.bk { background: var(--gold); }

/* ألوان الرسائل الشخصية — لكل شخص نبرته ولونه */
.motivate.p-manar { border-inline-start-color: #c9a0ff; background: linear-gradient(135deg, var(--card) 0%, #241a3d 100%); }
.motivate.p-manar .m-greet { color: #c9a0ff; }
.motivate.p-manar .m-quote { color: rgba(201,160,255,.2); }
.motivate.p-amr { border-inline-start-color: #5fc7e8; background: linear-gradient(135deg, var(--card) 0%, #0f2b3a 100%); }
.motivate.p-amr .m-greet { color: #5fc7e8; }
.motivate.p-amr .m-quote { color: rgba(95,199,232,.2); }
.motivate.p-boss { border-inline-start-color: var(--gold); background: linear-gradient(135deg, var(--card) 0%, #2e2410 100%); }
.motivate.p-boss .m-greet { color: var(--gold); }
.motivate.p-boss .m-quote { color: rgba(212,166,63,.22); }
.m-caret { border-inline-start: 2px solid var(--gold); animation: blink 1s step-end infinite; margin-inline-start: 2px; }
@keyframes blink { 50% { opacity: 0; } }

/* زر الدخول الرئيسي — لمسة العمق نفسها */
button.primary {
  box-shadow: 0 5px 0 #7d060c, 0 12px 22px rgba(229,9,20,.25);
  transition: transform .1s ease, box-shadow .1s ease, background .2s;
}
button.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 #7d060c; }

/* ============================================
   🏆 موظف الشهر — إطار ذهبي فخم
============================================ */
.eom {
  margin-top: 20px; border-radius: 20px; padding: 3px; position: relative;
  background: linear-gradient(120deg, #8a6a1e 0%, #e7c46a 20%, #fff3c4 38%, #D4A63F 55%, #8a6a1e 75%, #e7c46a 100%);
  background-size: 220% 220%;
  box-shadow: 0 16px 44px rgba(212,166,63,.2), 0 4px 14px rgba(0,0,0,.4);
  animation: eomSheen 7s ease-in-out infinite;
}
@keyframes eomSheen { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.eom-inner {
  border-radius: 17px; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(420px 200px at 50% -60px, rgba(212,166,63,.22), transparent 70%),
    linear-gradient(165deg, #1d1707 0%, var(--card) 55%);
  padding: 30px 22px 26px;
}
.eom-inner::before, .eom-inner::after {
  content: '✦'; position: absolute; top: 10px; color: var(--gold); opacity: .7; font-size: 1rem;
}
.eom-inner::before { inset-inline-start: 14px; }
.eom-inner::after { inset-inline-end: 14px; }
.eom-crown { font-size: 2.4rem; display: block; line-height: 1; filter: drop-shadow(0 4px 10px rgba(212,166,63,.45)); }
.eom-title {
  color: var(--gold); letter-spacing: .18em; font-size: .82rem; font-weight: 700;
  margin: 10px 0 2px; text-transform: uppercase;
}
.eom-name {
  font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.3rem);
  color: #f4dfa0; text-shadow: 0 2px 18px rgba(212,166,63,.5); line-height: 1.3;
}
.eom-sub { color: var(--ink-soft); margin: 8px 0 0; font-size: .95rem; }
.eom-sub b { color: var(--gold); font-variant-numeric: tabular-nums; }
.eom-laurel { display: flex; justify-content: center; gap: 14px; margin-top: 4px; color: var(--gold); opacity: .85; font-size: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  .m-caret, .eom { animation: none; }
}

/* ============================================
   💰 الرواتب — بطاقات الصرف والسجل المالي
============================================ */
.pay-card { gap: 12px; }
.chip { display: inline-block; font-size: .82rem; font-weight: 700; border-radius: 999px; padding: 4px 13px; border: 1.5px solid; align-self: flex-start; }
.chip.pdue { color: var(--gold); border-color: var(--gold); background: rgba(212,166,63,.12); }
.chip.plate { color: var(--red-soft); border-color: var(--red); background: rgba(229,9,20,.12); }
.pay-ok { color: var(--green); font-weight: 700; font-size: 1.05rem; }
.pay-break { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.pay-break div { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; color: var(--ink-soft); }
.pay-break b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pay-break .pt { border-top: 1px dashed var(--line); padding-top: 6px; font-weight: 700; color: var(--ink); }
.pay-break .pt b { color: var(--gold); font-family: 'Alexandria', sans-serif; font-size: 1.1rem; }
.stamp.pay {
  --side: #8a6a1e; --side2: #6b520f; --glow: rgba(212,166,63,.3);
  background: linear-gradient(180deg, #e7c46a 0%, #D4A63F 50%, #a87f22 100%);
  color: #241a05; text-shadow: 0 1px 1px rgba(255,255,255,.25);
  font-size: 1.02rem; padding: 13px 22px; width: 100%;
}
.bonus-box { margin-top: 2px; }
.bonus-box summary { cursor: pointer; color: var(--ink-soft); font-size: .88rem; font-weight: 700; list-style-position: inside; }
.bonus-box summary:hover { color: var(--gold); }
.bonus-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bonus-form input { margin: 0; padding: 9px 11px; font-size: .92rem; }
.bonus-form .ghost.btn { color: var(--gold); border-color: var(--gold); }

/* خصومات الرواتب */
.kpi.r { --kc: var(--red-soft); }
.pay-break .pd span { color: var(--red-soft); }
.pay-break .pd b { color: var(--red-soft); }

/* ============================================
   💰 رصيدي — إشعار وقسم المكافآت/الخصومات للموظف
============================================ */
.paynote {
  display: flex; align-items: center; gap: 14px; border-radius: 14px; padding: 16px 20px;
  margin-bottom: 14px; animation: mIn .5s ease; border: 1.5px solid;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.paynote .pn-ic { font-size: 2rem; line-height: 1; }
.paynote b { display: block; font-family: 'Alexandria', sans-serif; font-size: 1.15rem; }
.paynote span:not(.pn-ic) { color: var(--ink-soft); font-size: .92rem; }
.paynote.bonus { border-color: var(--green); background: linear-gradient(135deg, var(--card) 0%, #10281d 100%); }
.paynote.bonus b { color: var(--green); }
.paynote.ded { border-color: var(--red); background: linear-gradient(135deg, var(--card) 0%, #2a1013 100%); }
.paynote.ded b { color: var(--red-soft); }
@media (prefers-reduced-motion: reduce) { .paynote { animation: none; } }

/* بطاقة الرصيد المباشر — أول ما يشوفه الموظف: كم له بعد الخصومات */
.bal-card {
  border: 1.5px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--card-2) 0%, var(--card) 100%);
}
.bal-net { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bal-net .bl { color: var(--ink-soft); font-size: .9rem; }
.bal-net .bv {
  font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 2rem;
  font-variant-numeric: tabular-nums; color: var(--gold);
}
.bal-lines { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line); }
.bal-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .93rem; }
.bal-lines li span { color: var(--ink-soft); }
.bal-lines li b { font-variant-numeric: tabular-nums; }
.bal-lines li.up b { color: var(--green); }
.bal-lines li.down b { color: var(--red-soft); }
.bal-note { color: var(--ink-soft); font-size: .8rem; margin: 10px 0 0; }

.mine-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.mkpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-align: center; background: var(--card-2); }
.mkpi .v { display: block; font-family: 'Alexandria', sans-serif; font-weight: 800; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.mkpi .l { color: var(--ink-soft); font-size: .82rem; }
.mkpi.bonus .v { color: var(--green); }
.mkpi.ded .v { color: var(--red-soft); }

/* 📩 رسالة الإدارة — بارزة وجادّة */
.admin-msg {
  background: linear-gradient(135deg, #2a1010 0%, var(--card) 100%);
  border: 1.5px solid var(--red); border-inline-start: 5px solid var(--red);
  border-radius: 14px; padding: 20px 22px; margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(229,9,20,.2), 0 0 0 1px rgba(229,9,20,.15);
  animation: mIn .5s ease;
}
.am-head { font-family: 'Alexandria', sans-serif; font-weight: 800; color: var(--red-soft); font-size: 1.15rem; margin-bottom: 10px; }
.am-body { color: var(--ink); font-size: 1rem; line-height: 1.9; white-space: pre-line; }
.am-ack { margin-top: 14px; background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 11px 22px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 #7d060c; transition: transform .1s; }
.am-ack:hover { filter: brightness(1.08); }
.am-ack:active { transform: translateY(4px); box-shadow: 0 0 0 #7d060c; }

/* أزرار الرد على رسالة الإدارة */
.am-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.am-ack.ok { background: var(--green); box-shadow: 0 4px 0 #1a8a5f; }
.am-ack.no { background: var(--card-2); color: var(--ink-soft); border: 1.5px solid var(--line); box-shadow: none; }
.am-ack.no:hover { color: var(--red-soft); border-color: var(--red); filter: none; }
.am-ack.no:active { transform: translateY(1px); }


/* ============================================
   ⚡ أوفر تايمي — لوحة الموظف
   مبادئ: المكسب بطل الصفحة · هدف قادم قريب · تفصيل شفاف
   المعايير: تباين ≥ 4.5:1 · أيقونات SVG لا إيموجي · أرقام tabular
             · حركة 300–450ms تُعطَّل مع prefers-reduced-motion
             · الجدول يتحول بطاقات تحت 640px (لا تمرير أفقي للصفحة)
============================================ */
.ic { width: 1.05em; height: 1.05em; vertical-align: -.15em; flex: 0 0 auto; }
.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;
}

/* ظهور متدرّج عند التحميل — يقود العين من المكسب إلى التفصيل */
.reveal { animation: otIn .42s cubic-bezier(.16,1,.3,1) both; }
.reveal:nth-of-type(2) { animation-delay: .06s; }
.reveal:nth-of-type(3) { animation-delay: .12s; }
.reveal:nth-of-type(4) { animation-delay: .18s; }
.reveal:nth-of-type(5) { animation-delay: .24s; }
@keyframes otIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- البطاقة البطل ---------- */
.ot-hero {
  position: relative; overflow: hidden;
  border: 1.5px solid rgba(212,166,63,.45); border-radius: 18px;
  padding: 30px 22px 26px; margin-bottom: 14px; text-align: center;
  background: radial-gradient(120% 100% at 50% 0%, #1E1809 0%, var(--card) 58%);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.ot-hero-glow {
  position: absolute; inset-inline-start: 50%; top: -120px; width: 320px; height: 240px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(circle, rgba(212,166,63,.22) 0%, transparent 68%);
}
.ot-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-soft); font-size: .92rem; margin: 0 0 8px;
}
.ot-money {
  margin: 0; font-family: 'Alexandria', sans-serif; font-weight: 800;
  font-size: clamp(2.3rem, 9vw, 3.1rem); line-height: 1.1;
  color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.ot-hours { color: var(--ink); margin: 8px 0 0; font-size: 1rem; }
.ot-rate {
  display: inline-flex; align-items: center; gap: 7px; margin: 18px 0 0;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(43,196,138,.09); border: 1px solid rgba(43,196,138,.35);
  color: var(--ink); font-size: .9rem;
}
.ot-rate b { color: var(--green); }

/* ---------- الهدف القادم: خط نهاية قريب يحفّز على التمديد ---------- */
.ot-goal {
  margin: 22px auto 0; max-width: 460px; text-align: start;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
}
.ot-goal-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .88rem; }
.ot-goal-top span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.ot-goal-top b { color: var(--gold); font-variant-numeric: tabular-nums; }
.ot-bar {
  height: 10px; border-radius: 999px; margin: 10px 0 9px; overflow: hidden;
  background: #0A1122; border: 1px solid var(--line);
}
.ot-bar-fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green) 0%, var(--gold) 100%);
  animation: otGrow .7s cubic-bezier(.16,1,.3,1) both;
}
@keyframes otGrow { from { transform: scaleX(.04); transform-origin: inline-start; } to { transform: none; } }
.ot-goal-note { margin: 0; color: var(--ink-soft); font-size: .84rem; }
.ot-goal-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- مؤشرات مختصرة ---------- */
.ot-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.ot-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 10px; text-align: center;
}
.ot-stat .os-ic { display: block; color: var(--ink-soft); margin-bottom: 6px; }
.ot-stat .os-ic .ic { width: 20px; height: 20px; }
.ot-stat b {
  display: block; font-family: 'Alexandria', sans-serif; font-weight: 800;
  font-size: 1.12rem; font-variant-numeric: tabular-nums; color: var(--ink);
}
.ot-stat b small { color: var(--ink-soft); font-weight: 400; font-size: .8rem; }
.ot-stat .os-l { display: block; color: var(--ink-soft); font-size: .78rem; margin-top: 4px; line-height: 1.5; }

/* ---------- شريط التحفيز ---------- */
.ot-push {
  display: flex; gap: 14px; align-items: center; margin-bottom: 14px;
  border: 1.5px solid rgba(43,196,138,.5); border-inline-start: 5px solid var(--green);
  border-radius: 14px; padding: 16px 18px;
  background: linear-gradient(120deg, rgba(43,196,138,.10) 0%, var(--card) 62%);
}
.ot-push .op-ic { color: var(--green); display: grid; place-items: center; }
.ot-push .op-ic .ic { width: 26px; height: 26px; }
.op-txt b { display: block; font-family: 'Alexandria', sans-serif; font-size: .97rem; line-height: 1.6; }
.op-txt > span { display: block; color: var(--ink-soft); font-size: .88rem; margin-top: 5px; line-height: 1.7; }
.op-amt { color: var(--green); font-variant-numeric: tabular-nums; }

/* ---------- الجدول اليومي ---------- */
.panel-sub { color: var(--ink-soft); font-size: .82rem; }
.ot-scroll { overflow-x: auto; }
.ot-table { width: 100%; border-collapse: collapse; }
.ot-table th, .ot-table td { padding: 11px 10px; text-align: start; }
.ot-table tbody tr { border-top: 1px solid var(--line); }
.ot-table tr.ot-win { background: rgba(43,196,138,.05); }
.ot-table tfoot tr { border-top: 1.5px solid var(--line); }
.ot-table tfoot th, .ot-table tfoot td { font-family: 'Alexandria', sans-serif; padding-top: 13px; }
.ot-day { white-space: nowrap; }
.ot-ot { color: var(--ink); font-variant-numeric: tabular-nums; }
.ot-cash { color: var(--gold); font-variant-numeric: tabular-nums; }
.ot-dash { color: var(--ink-soft); }
.ot-table .badge .ic { width: 13px; height: 13px; }

/* عمود مصغّر: الجزء الأساسي + الزيادة بلون مختلف (المعنى لا يعتمد على اللون وحده — الرقم بجانبه) */
.ot-wrap { display: flex; align-items: center; gap: 9px; }
.ot-mini { display: flex; width: 86px; height: 7px; border-radius: 999px; overflow: hidden; background: #0A1122; flex: 0 0 auto; }
.ot-mini .mb { display: block; height: 100%; }
.ot-mini .base { background: var(--ink-soft); opacity: .55; }
.ot-mini .extra { background: var(--green); }
.ot-num { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: .9rem; }

/* ---------- قواعد الاحتساب ---------- */
.ot-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ot-rules li {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card-2);
}
.ot-rules .orn {
  flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: .8rem; font-weight: 700; margin-top: 1px;
}
.ot-rules b { display: block; font-size: .95rem; line-height: 1.6; }
.ot-rules div > span { color: var(--ink-soft); font-size: .85rem; line-height: 1.7; }

/* ---------- الجوال: الجدول يصير بطاقات ---------- */
@media (max-width: 640px) {
  .ot-stats { grid-template-columns: 1fr; }
  .ot-stat { display: flex; align-items: center; gap: 12px; text-align: start; padding: 12px 14px; }
  .ot-stat .os-ic { margin: 0; }
  .ot-stat b { font-size: 1rem; }
  .ot-stat .os-l { margin: 0; margin-inline-start: auto; text-align: end; }

  .ot-scroll { overflow: visible; }
  .ot-table thead { display: none; }
  .ot-table, .ot-table tbody, .ot-table tfoot, .ot-table tr, .ot-table th, .ot-table td { display: block; }
  .ot-table tr {
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px;
    background: var(--card-2);
  }
  .ot-table tr.ot-win { border-color: rgba(43,196,138,.45); }
  .ot-table td, .ot-table th { padding: 5px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .ot-table td::before, .ot-table tfoot th::before {
    content: attr(data-l); color: var(--ink-soft); font-size: .82rem; flex: 0 0 auto;
  }
  .ot-table td:empty { display: none; }
  .ot-mini { width: 64px; }
}

/* ---------- احترام تفضيل تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, .ot-bar-fill { animation: none; }
}

/* ⏱️ العدّاد الحي — يظهر والموظف داخل الدوام فقط */
.ot-live {
  border: 1.5px solid rgba(43,196,138,.55); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(43,196,138,.10) 0%, var(--card) 65%);
}
.ol-head { display: flex; align-items: center; gap: 9px; font-family: 'Alexandria', sans-serif; font-size: .95rem; }
.ol-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: 0 0 auto;
  box-shadow: 0 0 0 0 rgba(43,196,138,.55); animation: olPulse 2s infinite;
}
@keyframes olPulse {
  70% { box-shadow: 0 0 0 9px rgba(43,196,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(43,196,138,0); }
}
.ol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.ol-grid > div { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.ol-l { display: block; color: var(--ink-soft); font-size: .78rem; margin-bottom: 5px; }
.ol-grid b { font-family: 'Alexandria', sans-serif; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.ol-ot { color: var(--green); }
.ol-next { margin: 13px 0 0; color: var(--ink-soft); font-size: .88rem; line-height: 1.7; }
.ol-next b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ol-gain { color: var(--green); }
@media (max-width: 560px) { .ol-grid { grid-template-columns: 1fr; } .ol-grid > div { display: flex; justify-content: space-between; align-items: center; } .ol-l { margin: 0; } }
@media (prefers-reduced-motion: reduce) { .ol-dot { animation: none; } }

/* ── وظائف متعددة للموظف + العمليات الملغاة (2026-08-02) ── */
.jobtag { display: inline-block; font-size: .72em; font-weight: 600; padding: 2px 9px;
  border-radius: 999px; background: rgba(212,175,55,.14); color: #D4AF37;
  vertical-align: middle; margin-inline-start: 6px; }
.pay-card.sidejob .jobtag { background: rgba(126,184,247,.14); color: #7EB8F7; }
.pay-card.sidejob { --accent: #7EB8F7; }

/* ── بطاقة الموظف الواحدة: وظائفه صفوفًا + إجمالي راتبه (2026-08-04) ── */
.jobtag.total { background: rgba(255,255,255,.07); color: var(--ink); font-weight: 700; }
.jobs { display: flex; flex-direction: column; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.jrow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  background: var(--card); padding: 8px 12px; font-size: .9rem; }
.jr-name { color: var(--ink); }
.jr-att { font-size: .82em; opacity: .65; }
.jr-amt { font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.jrow .jr-ok, .jrow .jr-due, .jrow .jr-late { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.jr-ok { color: var(--green); }
.jr-due { color: var(--gold); }
.jr-late { color: var(--red-soft); }
.pay-break.soft { opacity: .55; margin-top: 10px; }
.pay-break .pb b { color: #2ECC71; }
.zero-deds { margin-top: 8px; }
.zero-deds .btn { width: 100%; font-size: .85rem; }
tr.voided td { opacity: .42; text-decoration: line-through; }
tr.voided td:first-child, tr.voided td:last-child { text-decoration: none; }
.btn.tiny { padding: 2px 9px; font-size: .8rem; line-height: 1.6; }
.bal-lines li.sub { border-top: 1px dashed rgba(255,255,255,.14); opacity: .75; font-size: .9em; }
.ded-box summary { color: #E5484D; }

/* ── بوابة الانصراف (2026-08-02) ── */
.gatebox { border: 1px solid rgba(229,72,77,.4); background: linear-gradient(180deg, rgba(229,72,77,.07), transparent 60%); }
.gatebox .panel-head h2 { color: #E5484D; }
.gate-lead { font-size: .9rem; opacity: .8; margin: 6px 0 12px; line-height: 1.7; }
.gate-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.gate-table th { text-align: start; font-size: .78rem; opacity: .55; font-weight: 600; padding: 6px 8px; }
.gate-table td { padding: 8px; border-top: 1px solid rgba(255,255,255,.06); vertical-align: top; }
.gate-table a { color: #E5484D; font-weight: 700; text-decoration: none; }
.gate-last { opacity: .7; max-width: 22rem; }
.gate-esc { margin-top: 14px; border-top: 1px dashed rgba(255,255,255,.12); padding-top: 12px; }
.gate-esc summary { cursor: pointer; font-size: .88rem; opacity: .65; }
.gate-esc input { width: 100%; margin: 10px 0; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: inherit; font: inherit; }
.stamp.gate-locked { opacity: .55; cursor: pointer; }
.ded-hint { font-size: .78rem; opacity: .6; margin-top: 8px; line-height: 1.6; }
/* ── مُدقّق جودة الردود ── */
.qf-lead { font-size:.92rem; opacity:.85; margin:6px 0 12px; line-height:1.7; }
.qflag { border:1px solid rgba(255,255,255,.09); border-radius:12px; padding:12px 14px; margin-bottom:10px; }
.qflag.proposed { border-color:rgba(233,185,73,.45); background:rgba(233,185,73,.05); }
.qf-head { display:flex; flex-wrap:wrap; gap:10px; align-items:center; font-size:.88rem; margin-bottom:8px; }
.qf-kind { font-weight:700; color:#E9B949; }
.qf-who { opacity:.85; }
.qf-day { opacity:.5; font-size:.8rem; }
.qf-tkt { font-size:.78rem; padding:2px 10px; border-radius:999px; text-decoration:none;
  background:rgba(90,150,255,.13); color:#8AB4FF; border:1px solid rgba(90,150,255,.25); }
.qf-tkt:hover { background:rgba(90,150,255,.22); }
.qf-tkt.src { background:rgba(255,255,255,.06); color:inherit; opacity:.55; border-color:rgba(255,255,255,.1); }
.qf-amt { margin-inline-start:auto; font-weight:700; color:#E5484D; }
.qf-detail { white-space:pre-wrap; font-family:inherit; font-size:.85rem; opacity:.8;
  background:rgba(255,255,255,.03); border-radius:8px; padding:9px 11px; margin:0 0 10px; line-height:1.7; }
.qf-acts { display:flex; gap:8px; flex-wrap:wrap; }
.qf-acts form { margin:0; }
.qf-acts .stamp { padding:6px 16px; font-size:.86rem; }
.qf-on { font-size:.7rem; padding:2px 10px; border-radius:999px; background:rgba(46,204,113,.15); color:#2ECC71; vertical-align:middle; }
.qf-off { font-size:.7rem; padding:2px 10px; border-radius:999px; background:rgba(229,72,77,.15); color:#E5484D; vertical-align:middle; }
.qf-ctl { display:flex; gap:8px; }
.qf-ctl form { margin:0; }

/* ── مُدقّق أذكى: حالة الحكم الآلي، التجميع، الذاكرة (2026-08-04) ── */
.qf-aioff { background: rgba(229,72,77,.1); border: 1px solid rgba(229,72,77,.3); color: #E5484D;
  border-radius: 10px; padding: 10px 13px; font-size: .86rem; line-height: 1.8; margin-bottom: 10px; }
.qf-aioff span { color: var(--ink-soft); }
.qf-learn { font-size: .86rem; opacity: .8; margin-top: 12px; background: rgba(255,255,255,.03);
  border-radius: 8px; padding: 8px 12px; }
.qf-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.qf-group > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  cursor: pointer; background: rgba(255,255,255,.03); font-size: .92rem; }
.qf-gk { font-weight: 700; color: #E9B949; }
.qf-gn { background: rgba(255,255,255,.09); border-radius: 999px; padding: 1px 10px; font-size: .8rem; }
.qf-gd { font-size: .74rem; color: var(--red-soft); margin-inline-start: auto; }
.qf-gi { font-size: .74rem; opacity: .55; margin-inline-start: auto; }
.qf-bulk { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 14px 4px; }
.qf-bulk form { margin: 0; }
.qf-group .qflag { margin: 8px 14px; }

/* ── مستشار الجودة ── */
.ad-h { font-size: 1rem; margin: 18px 0 10px; }
.ad-bars { display: flex; flex-direction: column; gap: 9px; }
.ad-bar { display: grid; grid-template-columns: minmax(120px,auto) 1fr auto; align-items: center; gap: 12px; font-size: .9rem; }
.ad-track { background: rgba(255,255,255,.06); border-radius: 999px; height: 10px; overflow: hidden; }
.ad-track i { display: block; height: 100%; background: linear-gradient(90deg,#E9B949,#D4AF37); }
.ad-n { font-variant-numeric: tabular-nums; opacity: .75; }
.ad-tips { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 9px;
  font-size: .92rem; line-height: 1.8; }
.ad-tips li::marker { color: #E9B949; font-weight: 700; }
.ad-up { color: var(--green); font-size: .78rem; }
.ad-down { color: var(--red-soft); font-size: .78rem; }
.ad-flat { opacity: .6; font-size: .78rem; }
