/* ===== Marine Stuff HR — إضافات 27 أكتوبر: الجوال · الأوراق الرسمية · بطاقة العمل · اللغات ===== */

/* ---------- شريط اللغة أعلى الشاشة ---------- */
body{padding-top:30px}
#langSwitch{position:fixed;top:0;left:0;right:0;height:30px;z-index:60;background:#07192E;display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:0 10px;box-shadow:0 1px 0 rgba(255,255,255,.06)}
#langSwitch::before{content:'MARINE STUFF · HR';margin-inline-end:auto;color:#7E9BB8;font-size:10px;letter-spacing:1.2px;font-weight:600}
#langSwitch button{height:22px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#C9D7E3;font-size:12px;font-weight:600;line-height:1}
#langSwitch button.on{background:#fff;color:#0B3C5D}
#langSwitch button[lang=bn]{font-family:system-ui,'Noto Sans Bengali',sans-serif}
.splash,.shell,.emp,.login{min-height:calc(100vh - 30px)}
#modal{top:30px}
body.ltr th{text-align:left}
body.ltr .cam video{transform:scaleX(-1)}

/* ---------- الأوراق الرسمية ---------- */
.doclist{display:flex;flex-direction:column;gap:8px}
.docrow{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;flex-wrap:wrap}
.docrow.miss{border-style:dashed;background:#FAFBFC}
.docico{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:0 0 34px;background:var(--graybg);color:var(--gray)}
.docico.g{background:var(--greenbg);color:var(--green)}.docico.a{background:var(--amberbg);color:var(--amber)}.docico.r{background:var(--redbg);color:var(--red)}.docico.bl{background:var(--bluebg);color:var(--navy)}
.docs-tbl{min-width:760px}
.profile-actions{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.profile-actions .btn{height:40px;font-size:13px}

/* ---------- بطاقة العمل ---------- */
.bc-stage{display:flex;justify-content:center;padding:14px;background:#EEF2F5;border-radius:14px;overflow:auto}
.bcard{width:85.6mm;height:54mm;background:#fff;border-radius:3mm;overflow:hidden;display:flex;position:relative;box-shadow:0 6px 24px rgba(11,35,64,.18);color:#0B2340;font-family:'IBM Plex Sans Arabic',system-ui,sans-serif;flex:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.bcard .bc-side{width:9mm;flex:none;position:relative}
.bcard .bc-side svg{position:absolute;inset:0;width:100%;height:100%}
.bcard .bc-body{flex:1;min-width:0;padding:3.4mm 4mm 3mm;display:flex;flex-direction:column;justify-content:space-between}
.bcard .bc-top{display:flex;align-items:center;justify-content:space-between;gap:2mm}
.bcard .bc-logo{height:9.5mm;width:auto}
.bcard .bc-tag{display:flex;flex-direction:column;align-items:flex-end;font-size:2.3mm;font-weight:700;color:#1E7FC0;line-height:1.25}
.bcard .bc-tag .lat{font-size:1.9mm;letter-spacing:.5mm;color:#7E8FA3;font-weight:600}
.bcard .bc-main{display:flex;align-items:center;gap:3.5mm}
.bcard .bc-photo{width:17mm;height:17mm;border-radius:3mm;overflow:hidden;background:#E3ECF4;border:.5mm solid #9AD0F2;flex:none;display:flex;align-items:center;justify-content:center;font-size:7mm;font-weight:700;color:#0B3C5D}
.bcard .bc-photo img{width:100%;height:100%;object-fit:cover;display:block}
.bcard .bc-id{min-width:0;display:flex;flex-direction:column;gap:.9mm}
.bcard .bc-name{font-size:4.6mm;font-weight:700;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bcard .bc-title{font-size:2.9mm;color:#3C4C5B;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bcard .bc-meta{display:flex;align-items:center;gap:1.4mm;font-size:2.4mm;color:#5B6B7A;white-space:nowrap}
.bcard .bc-num{background:#0B2340;color:#fff;border-radius:1.2mm;padding:.5mm 1.6mm;font-weight:700;letter-spacing:.2mm;font-size:2.4mm;direction:ltr}
.bcard .bc-dot{color:#B7C2CE}
.bcard .bc-foot{display:flex;align-items:center;justify-content:space-between;border-top:.3mm solid #E3E8ED;padding-top:1.6mm;position:relative}
.bcard .bc-foot::before{content:'';position:absolute;top:-.3mm;inset-inline-start:0;width:12mm;height:.3mm;background:#C8302B}
.bcard .bc-co{font-size:2.6mm;font-weight:800;letter-spacing:.6mm;color:#0B2340}
.bcard .bc-web{font-size:2.3mm;color:#7E8FA3;direction:ltr}
/* بالطول */
.bcard.portrait{width:54mm;height:85.6mm;flex-direction:column}
.bcard.portrait .bc-side{width:auto;height:12mm;flex:none;background:linear-gradient(100deg,#0B2340 0%,#0B2340 45%,#1E7FC0 75%,#9AD0F2 100%)}
.bcard.portrait .bc-side svg{display:none}
.bcard.portrait .bc-body{padding:3mm 3.5mm 3mm;position:relative;z-index:1}
.bcard.portrait .bc-top{flex-direction:column;align-items:center;gap:1mm;margin-top:-8.5mm}
.bcard.portrait .bc-logo{height:12mm;background:#fff;border-radius:2mm;padding:1mm 2mm;box-shadow:0 .5mm 2mm rgba(11,35,64,.15)}
.bcard.portrait .bc-tag{align-items:center}
.bcard.portrait .bc-main{flex-direction:column;text-align:center;gap:2.4mm}
.bcard.portrait .bc-photo{width:24mm;height:24mm;border-radius:50%}
.bcard.portrait .bc-id{align-items:center;width:100%}
.bcard.portrait .bc-name{font-size:4.8mm;white-space:normal;text-align:center}
.bcard.portrait .bc-meta{justify-content:center;flex-wrap:wrap}
.bcard.portrait .bc-foot{flex-direction:column;gap:.6mm;align-items:center}
.bcard.portrait .bc-foot::before{inset-inline-start:calc(50% - 6mm)}
#cardPrint{display:none}
@media print{
  body.printing-card{padding:0!important;background:#fff}
  body.printing-card>*:not(#cardPrint){display:none!important}
  body.printing-card #cardPrint{display:block}
  body.printing-card .bcard{box-shadow:none;border-radius:0;margin:0}
  #langSwitch{display:none!important}
  body{padding-top:0}
}

/* ---------- الجوال ---------- */
@media(max-width:720px){
  .main{padding:14px 12px 96px;gap:14px}
  h1{font-size:20px}
  .head{flex-direction:column;align-items:stretch}
  .datebox{flex-wrap:wrap}
  .datebox input{flex:1;min-width:140px}
  .hero{min-height:0}
  .hero .in{min-height:0;padding:16px}
  .hero h1{font-size:18px}
  .badges{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
  .badge{padding:6px 8px;gap:6px;border-radius:10px}
  .badge .n{font-size:17px}.badge .l{font-size:10px}
  .badge>span:first-child{width:26px!important;height:26px!important}
  .alert{font-size:13px}
  .chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}
  .chips::-webkit-scrollbar{display:none}
  .chip{flex:none;height:34px;padding:0 12px}
  .legend{font-size:11px;gap:8px}
  /* الجداول → بطاقات */
  .tbl{overflow:visible;background:transparent;border:0}
  table{min-width:0;display:block;font-size:14px}
  thead{display:none}
  tbody{display:flex;flex-direction:column;gap:10px}
  tr{display:block;background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px 0;overflow:hidden}
  tr.sel{outline-offset:-2px}
  td{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 14px;border-bottom:1px solid #F2F5F8;text-align:end}
  td:last-child{border-bottom:0}
  td::before{content:attr(data-label);color:var(--mute);font-size:12px;font-weight:600;flex:0 0 auto;text-align:start}
  td:first-child{display:block;text-align:start;padding:8px 14px 10px;background:#F7F9FB;border-bottom:1px solid var(--line)}
  td:first-child::before{display:none}
  td.nolabel::before,td.span::before{display:none}
  td.nolabel{justify-content:flex-end}
  td.span{display:block;text-align:center}
  td .row{justify-content:flex-end}
  .docs-tbl{min-width:0}
  /* تفاصيل اليوم */
  .detail>div{flex-basis:100%}
  .photos{flex-direction:column}
  .photos>div{aspect-ratio:16/10}
  /* قائمة الإدارة → شريط سفلي */
  .shell{flex-direction:column}
  .nav{position:fixed;bottom:0;left:0;right:0;z-index:30;flex-direction:row;flex-wrap:nowrap;justify-content:space-around;align-items:stretch;padding:4px 2px calc(4px + env(safe-area-inset-bottom));gap:0;background:#fff;border-top:1px solid var(--line);box-shadow:0 -4px 16px rgba(11,60,93,.08)}
  .nav .brand,.nav .spacer,.nav .me{display:none}
  .nav a{flex:1;flex-direction:column;justify-content:center;gap:3px;padding:6px 2px;font-size:10px;color:var(--mute);border-radius:8px;text-align:center;line-height:1.1;min-width:0}
  .nav a svg{width:20px;height:20px}
  .nav a.on{background:var(--bluebg);color:var(--navy)}
  .sheet{padding:16px}
  .stats{grid-template-columns:repeat(2,1fr)}
  .monthgrid{gap:3px}
  .day{min-height:50px;font-size:10px;padding:4px}
  .sched{min-width:720px}
  .bc-stage{padding:10px}
  .bcard{transform-origin:top center}
}
@media(max-width:380px){
  .bcard.landscape{transform:scale(.9)}
}

/* ---------- صور الموظفين / الأفاتار / الأعلام (27 أكتوبر — مساءً) ---------- */
.avatar.photo{background:#E3ECF4;padding:0}
.avatar.photo svg{width:100%;height:100%;display:block}
.nat{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.flag{border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.12);flex:none}

/* ---------- المهام · الطلبات · الرسائل · خيار الراحة (27 أكتوبر — مساءً) ---------- */
.shcell{display:flex;flex-direction:column;gap:3px}
.shcell select{height:30px;border:1px solid var(--line);border-radius:8px;font-size:12px;background:#fff;padding:0 6px;color:var(--ink)}
.shcell.off select{background:var(--graybg);color:var(--mute)}
.shcell.off input{display:none}
.chip.idle{border-style:dashed;color:var(--mute)}
.chip.idle.on{border-style:solid}
.navbadge{margin-inline-start:auto;background:var(--red2);color:#fff;font-size:11px;font-weight:700;border-radius:999px;padding:1px 7px;line-height:1.4}
.task-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed var(--line)}
.card.tasks{background:#FFFBEB;border-color:#F5E3A8}
.task-item{display:flex;align-items:center;gap:10px;padding:8px 4px;border-bottom:1px dashed #F0E2B0;font-size:14px;cursor:pointer}
.task-item:last-child{border-bottom:0}
.task-item input{width:20px;height:20px;flex:none;accent-color:var(--green)}
.task-item .dot{width:8px;height:8px;border-radius:50%;background:var(--amber);flex:none;margin:0 6px}
.task-item.done .grow{text-decoration:line-through;color:var(--mute)}
.emoji-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.emoji-row .emo{width:34px;height:34px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:18px;line-height:1;padding:0}
.pmsg{text-align:center;padding:10px 4px 4px}
.pmsg-ico{font-size:56px;line-height:1}
.pmsg-name{font-size:14px;color:var(--mute);margin-top:10px}
.pmsg-text{font-size:22px;font-weight:700;color:var(--navy);margin-top:6px;line-height:1.5}
@media(max-width:720px){.nav a .navbadge{position:absolute;top:2px;inset-inline-end:8px;margin:0;padding:0 5px;font-size:10px}.nav a{position:relative}}
.sched{align-items:start}
.emp .top{flex-wrap:wrap;gap:6px}
.emp .top>.xs.mute{flex:1 1 100%;text-align:start;color:var(--navy);font-weight:600;font-size:12px}
#modal:has(.pmsg){align-items:center;padding:20px}
.sheet:has(.pmsg){border-radius:20px;max-width:420px}
/* جدول الدوام: فاصل واضح بين صفوف الموظفين */
.sched{gap:8px 6px;align-items:stretch}
.sched>*{padding:6px 0 14px;border-bottom:1px solid var(--line)}
.sched>:nth-child(-n+8){padding:0 0 8px;border-bottom:2px solid var(--line)}
.sched>:nth-child(8n+9){padding-top:10px}
/* العبارة بجانب كاميرا السيلفي */
.phrase{display:flex;align-items:center;gap:12px;background:linear-gradient(135deg,#E3F2FC,#F6FBFF);border:1px solid #BFD9F2;border-radius:14px;padding:10px 14px;margin:0 0 12px}
.phrase.out{background:linear-gradient(135deg,#EEF0FA,#F8F8FF);border-color:#CDD3F0}
.phrase .ph-ico{font-size:30px;line-height:1;flex:none}
.phrase .ph-name{font-size:12px;color:var(--mute)}
.phrase .ph-text{font-size:17px;font-weight:700;color:var(--navy);line-height:1.45}

/* الشعار الرسمي في القائمة وصفحة الدخول */
.nav .brand{padding:0 4px 14px}
.nav .brand img{height:46px;width:auto;background:#fff;border-radius:12px;padding:4px 10px;display:block}
@media(max-width:720px){.nav .brand{display:none}}
/* جدول الأسبوع من الموظف المخوَّل */
.pw-row{display:grid;grid-template-columns:52px 72px minmax(0,1fr) minmax(0,1fr);gap:5px;align-items:center;padding:6px 0;border-bottom:1px dashed var(--line)}
.card.pw{overflow:hidden}
.pw-row:last-child{border-bottom:0}
.pw-row .pw-day{font-size:13px;font-weight:600}
.pw-row select,.pw-row input{height:36px;border:1px solid var(--line);border-radius:8px;padding:0 4px;font-size:12px;background:#fff;width:100%;min-width:0}
.pw-row.off input{visibility:hidden}
.pw-row.off select{background:var(--graybg);color:var(--mute)}

/* زر الإرسال ثابت فوق الشريط السفلي في الجوال */
.emp{padding-bottom:120px}
.sendbar{position:sticky;bottom:calc(74px + env(safe-area-inset-bottom));z-index:9;padding:10px 0 6px;background:linear-gradient(180deg,rgba(244,246,248,0),var(--bg) 40%)}
.sendbar .btn{height:52px;font-size:16px;box-shadow:0 8px 24px rgba(11,60,93,.25)}
@media(min-width:721px){.sendbar{bottom:0}}
/* الدوام المعتمد داخل أيام الشهر */
.day{min-height:64px}
.day .sh{font-size:10px;color:var(--navy);opacity:.85;font-weight:600;text-align:end}
.day.f .sh{opacity:.7}
@media(max-width:720px){.day{min-height:58px}.day .sh{font-size:9px}}
