/* ============================================================================
   web-portal.css — بوابة الويب والهاتف (منظومة ترخيص المراكب — مرفأ سوق الجمعة)
   تصميم عربي RTL، أولوية للهاتف، بلا أي مورد خارجي (صفر CDN).
   ملف مستقل تماماً — لا يمسّ style.css ولا phase4-ui.css.
   ========================================================================= */

:root {
  --mz-navy: #0f2b5c;
  --mz-navy-2: #173d7a;
  --mz-navy-3: #1e4e97;
  --mz-gold: #c8a24a;
  --mz-gold-soft: #e8d6a3;
  --mz-bg: #eef2f8;
  --mz-card: #ffffff;
  --mz-ink: #16233a;
  --mz-ink-2: #4a5a75;
  --mz-ink-3: #7b8aa3;
  --mz-line: #dbe3ee;
  --mz-ok: #16794a;
  --mz-ok-bg: #e6f5ee;
  --mz-warn: #9a6206;
  --mz-warn-bg: #fdf3e0;
  --mz-err: #a8232b;
  --mz-err-bg: #fdeceb;
  --mz-radius: 14px;
  --mz-shadow: 0 2px 10px rgba(15, 43, 92, .08);
  --mz-shadow-lg: 0 10px 30px rgba(15, 43, 92, .16);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: #061938;
  color: var(--mz-ink);
  font-family: "Segoe UI", "Noto Naskh Arabic", "Traditional Arabic", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

body:has(#viewDashboard:not([hidden])),
body:has(#viewChange:not([hidden])) {
  background: var(--mz-bg);
}

/* ── شاشة الإقلاع ───────────────────────────────────────────────────── */
[hidden],
.mz-boot[hidden],
#mzBoot[hidden] {
  display: none !important;
}

.mz-boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #c8d9f4;
  background: #061938;
}

.mz-boot-lamp {
  animation: mzPulse 1.6s ease-in-out infinite;
  color: var(--mz-gold);
}

.mz-boot-text {
  margin: 0;
  color: #a2b9dc;
  font-size: 14px;
}

@keyframes mzPulse {

  0%,
  100% {
    opacity: .45;
    transform: scale(.94);
  }

  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

/* ── الإطار العام ───────────────────────────────────────────────────── */
.mz-app {
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

.mz-view {
  animation: mzIn .22s ease-out;
}

.mz-view:not(.mz-view--login) {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 14px 34px;
}

@keyframes mzIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   شاشة تسجيل الدخول التفاعلية لـ PWA والهاتف (مطابقة ذرية للصورة 4K)
   أبعاد الصورة المرجعية: 576x1280 (نسبة العرض للارتفاع = 9:20 = 0.45)
   تكامل كلي: ملء الشاشة بالكامل دون أي فراغات جانبية على الهواتف
   واجهة كمبيوتر ملكية فخمة + فصل هندسي تام يمنع أي تداخل نصي
   ═══════════════════════════════════════════════════════════════════════ */

/* ── للهواتف المحمولة وتطبيق PWA (أندرويد وآيفون): ملء الشاشة بالكامل ── */
@media (max-width: 640px) {
  html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    background: #013778;
  }

  .mz-app {
    width: 100%;
    min-height: 100%;
    padding: 0;
    margin: 0;
  }

  .mz-view--login {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: block;
    background: #013778;
  }

  .mz-login-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    aspect-ratio: auto;
    background: #013778;
    overflow: hidden;
  }

  .mz-login-bg-img {
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: fill; /* يملأ شاشة الهاتف بالكامل دون أي فراغات جانبية إطلاقاً */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
}

/* ── لحواسيب وشاشات الكمبيوتر مهما بلغ حجمها: عرض متناسق واحترافي فخم ── */
@media (min-width: 641px) {
  .mz-view--login {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(ellipse at 50% 25%, #0d3b75 0%, #06234b 55%, #021226 100%);
  }

  .mz-login-stage {
    position: relative;
    width: min(520px, 92vw);
    aspect-ratio: 576 / 1280;
    max-height: min(94vh, 920px);
    border-radius: 26px;
    box-shadow:
      0 25px 70px rgba(0, 8, 24, 0.8),
      0 0 0 1.5px rgba(200, 162, 74, 0.4),
      0 0 45px rgba(13, 59, 117, 0.5);
    background: #013778;
    overflow: hidden;
    margin: 0 auto;
    user-select: none;
  }

  .mz-login-bg-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
}

/* الطبقة التفاعلية الحية المنطبقة فوق الصورة */
.mz-login-form-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 5;
}

/* ١) موضع حقل اسم المستخدم: X=45..531 (84.375%), Y=559..624 (5.0781%) */
.mz-live-slot--username {
  position: absolute;
  left: 7.8125%;
  width: 84.375%;
  top: 43.6719%;
  height: 5.0781%;
  border-radius: 12px;
  cursor: text;
  display: flex;
  align-items: center;
  transition: box-shadow .15s ease;
}

/* ٢) موضع حقل كلمة المرور: X=45..531 (84.375%), Y=691..755 (5.0%) */
.mz-live-slot--password {
  position: absolute;
  left: 7.8125%;
  width: 84.375%;
  top: 53.9844%;
  height: 5.0%;
  border-radius: 12px;
  cursor: text;
  display: flex;
  align-items: center;
  transition: box-shadow .15s ease;
}

.mz-live-slot:focus-within {
  box-shadow: 0 0 0 2.5px rgba(2, 95, 181, 0.45);
}

/* الحقول النصية الحية: تبدأ بدقة بعد الأيقونة المرسومة باليسار */
.mz-live-input {
  position: absolute;
  top: 6%;
  bottom: 6%;
  padding: 0 8px;
  font-family: inherit;
  font-size: clamp(14px, 2.8vw, 16px);
  font-weight: 600;
  color: #162a4d;
  background: transparent;
  border: none;
  outline: none;
  border-radius: 8px;
  transition: background .12s ease;
}

/* حقل اسم المستخدم: يبدأ بدقة بعد أيقونة المستخدم اليسرى */
.mz-live-input--user {
  left: 50px !important;
  right: 15px !important;
  width: calc(100% - 65px) !important;
  text-align: left;
  direction: ltr;
}

/* حقل كلمة المرور: يبدأ بعد أيقونة القفل اليسرى (left: 50px) وينتهي قبل العين السحرية اليمنى (right: 48px) لمنع أي تداخل نهائياً */
.mz-live-input--pw {
  left: 50px !important;
  right: 48px !important;
  width: calc(100% - 98px) !important;
  text-align: left;
  direction: ltr;
}

/* إخفاء زر العين الافتراضي لمتصفح إيدج وكروم لمنع ظهور عين ثانية مكررة نهائياً */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input::-ms-reveal,
input::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
}

/* عند التركيز أو وجود نص، يغطي النص التوضيحي المرسوم بنقاء تام */
.mz-live-input:focus,
.mz-live-input:not(:placeholder-shown) {
  background: #edf6fd; /* لون خلفية الصندوق المطابق بنسبة 100% */
}

.mz-live-input::placeholder {
  color: #8da4be;
  opacity: 0; /* الشفافية تجعل النص المرسوم بالصورة يظهر تلقائياً بدون أي تكرار */
  transition: opacity .15s ease;
}

.mz-live-input:focus::placeholder {
  opacity: 0.65;
}

/* زر العين السحرية التفاعلي الوحيد: مثبت في أقصى اليمين الحقيقي بدقة هندسية مطلقة */
.mz-magic-eye {
  position: absolute !important;
  right: 8px !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px;
  height: 36px;
  background: #edf6fd !important; /* لون متطابق 100% يغطي أي رسمة سابقة بنقاء تام */
  border: none;
  border-radius: 8px;
  color: #5c799e;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: color .15s, background .15s, transform .08s;
  -webkit-tap-highlight-color: transparent;
}

.mz-magic-eye:hover {
  color: #025fb5;
  background: #e1f0fb !important;
}

.mz-magic-eye:active {
  transform: translateY(-50%) scale(0.92);
  background: #d4eaf9 !important;
}

.mz-magic-eye.is-revealed {
  color: #025fb5;
}

.mz-magic-eye .mz-eye-svg {
  display: block;
  pointer-events: none;
}

/* الحالة التلقائية (كلمة المرور نقاط سرية): إظهار العين المحجوبة وإخفاء العين المفتوحة */
.mz-magic-eye .mz-eye-svg--open,
.mz-magic-eye .mz-eye-svg--show {
  display: none !important;
}

.mz-magic-eye .mz-eye-svg--masked,
.mz-magic-eye .mz-eye-svg--hide {
  display: block !important;
}

/* عند النقر وإظهار النص الصريح: إظهار شكل العين المفتوحة وإخفاء المحجوبة */
.mz-magic-eye.is-revealed .mz-eye-svg--open,
.mz-magic-eye.is-revealed .mz-eye-svg--show {
  display: block !important;
}

.mz-magic-eye.is-revealed .mz-eye-svg--masked,
.mz-magic-eye.is-revealed .mz-eye-svg--hide {
  display: none !important;
}

/* ٤) موضع زر تسجيل الدخول: X=45..531 (84.375%), Y=783..849 (5.1563%) */
.mz-live-btn {
  position: absolute;
  left: 7.8125%;
  width: 84.375%;
  top: 61.1719%;
  height: 5.1563%;
  border-radius: 12px;
  border: none;
  outline: none;
  cursor: pointer;
  background: transparent;
  color: transparent;
  font-family: inherit;
  font-size: clamp(15px, 3vw, 17px);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  transition: background .15s ease, color .15s ease, transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}

.mz-live-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mz-live-btn:active {
  transform: scale(0.985);
  background: rgba(0, 0, 0, 0.12);
}

/* عند التحقق والاتصال بالسيرفر: تغطية وتنشيط النص الحي مع مؤشر الدوران */
.mz-live-btn:disabled {
  cursor: not-allowed;
  background: linear-gradient(180deg, #025fb5 0%, #003e87 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(2, 95, 181, 0.4);
}

.mz-live-btn:disabled .mz-btn-label {
  color: #ffffff !important;
}

/* ٣) إشعار التحقق والأخطاء: متموضع بدقة دون أي إزاحة للعناصر */
.mz-live-notice {
  position: absolute;
  left: 7.8125%;
  width: 84.375%;
  top: 66.8%;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: clamp(11.5px, 2.4vw, 13px);
  font-weight: 600;
  text-align: center;
  background: #fdeceb;
  border: 1px solid #f2c9c7;
  color: #a8232b;
  box-shadow: 0 4px 14px rgba(168, 35, 43, 0.22);
  z-index: 10;
  animation: mzIn .18s ease-out;
  white-space: pre-line;
}



/* ── الترويسة ───────────────────────────────────────────────────────── */
.mz-hero {
  background: linear-gradient(160deg, var(--mz-navy) 0%, var(--mz-navy-3) 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  margin: 0 -14px 16px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: var(--mz-shadow-lg);
  position: relative;
  overflow: hidden;
}

.mz-hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--mz-gold), transparent);
}

.mz-hero--compact {
  padding: 22px 20px 18px;
}

.mz-hero-lamp {
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  color: var(--mz-gold-soft);
  border: 1px solid rgba(200, 162, 74, .45);
}

.mz-hero-lamp--warn {
  color: var(--mz-gold);
  border-color: var(--mz-gold);
}

.mz-hero-title {
  margin: 0 0 3px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.35;
}

.mz-hero-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: #c9d7ef;
  line-height: 1.4;
}

.mz-channel-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #eaf1ff;
}

/* ── البطاقة ────────────────────────────────────────────────────────── */
.mz-card {
  background: var(--mz-card);
  border-radius: var(--mz-radius);
  padding: 18px 16px;
  box-shadow: var(--mz-shadow);
  border: 1px solid var(--mz-line);
}

/* ── الحقول ─────────────────────────────────────────────────────────── */
.mz-field {
  margin-bottom: 15px;
}

.mz-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--mz-ink-2);
  margin-bottom: 6px;
}

.mz-input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  font-size: 16px;
  /* ١٦ بكسل: يمنع تكبير iOS التلقائي */
  font-family: inherit;
  color: var(--mz-ink);
  background: #f8fafd;
  border: 1.5px solid var(--mz-line);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.mz-input:focus {
  border-color: var(--mz-navy-3);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 78, 151, .13);
}

.mz-input[dir="ltr"] {
  text-align: left;
}

.mz-input::placeholder {
  color: var(--mz-ink-3);
}

.mz-input-wrap {
  position: relative;
}

.mz-input--pw {
  padding-inline-start: 46px;
}

.mz-eye {
  position: absolute;
  inset-inline-start: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--mz-ink-3);
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mz-eye:active {
  background: #eef2f8;
}

/* ── التنبيهات ──────────────────────────────────────────────────────── */
.mz-notice {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  white-space: pre-line;
}

.mz-notice--err {
  background: var(--mz-err-bg);
  border-color: #f2c9c7;
  color: var(--mz-err);
}

.mz-notice--ok {
  background: var(--mz-ok-bg);
  border-color: #bfe6d4;
  color: var(--mz-ok);
}

.mz-notice--warn {
  background: var(--mz-warn-bg);
  border-color: #f0dcb0;
  color: var(--mz-warn);
}

.mz-notice--info {
  background: #eaf1fb;
  border-color: #cfdff5;
  color: var(--mz-navy-2);
}

/* ── الأزرار ────────────────────────────────────────────────────────── */
.mz-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .08s, opacity .15s, background .15s;
}

.mz-btn:active {
  transform: scale(.985);
}

.mz-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.mz-btn--primary {
  background: linear-gradient(160deg, var(--mz-navy-2), var(--mz-navy-3));
  color: #fff;
  box-shadow: 0 3px 12px rgba(23, 61, 122, .28);
}

.mz-btn--ghost {
  background: transparent;
  color: var(--mz-ink-2);
  border: 1.5px solid var(--mz-line);
  margin-top: 10px;
}

.mz-btn--danger {
  background: #fff;
  color: var(--mz-err);
  border: 1.5px solid #f2c9c7;
  margin-top: 18px;
}

.mz-spin {
  animation: mzSpin .8s linear infinite;
  display: inline-flex;
}

@keyframes mzSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ── التلميحات ──────────────────────────────────────────────────────── */
.mz-hint {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--mz-ink-3);
  line-height: 1.6;
}

.mz-hint--tight {
  margin-top: 5px;
}

.mz-foot {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--mz-ink-3);
}

/* ── مقياس القوة ────────────────────────────────────────────────────── */
.mz-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
}

.mz-meter-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #e6ecf5;
  overflow: hidden;
}

.mz-meter-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--mz-err);
  transition: width .25s, background .25s;
}

.mz-meter-label {
  font-size: 12px;
  color: var(--mz-ink-2);
  min-width: 66px;
}

/* ── قائمة الشروط ───────────────────────────────────────────────────── */
.mz-reqs {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.mz-reqs li {
  font-size: 12.5px;
  color: var(--mz-ink-2);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.mz-reqs li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--mz-line);
  flex: 0 0 auto;
  background: #fff;
}

.mz-reqs li.is-ok {
  color: var(--mz-ok);
}

.mz-reqs li.is-ok::before {
  border-color: var(--mz-ok);
  background: var(--mz-ok);
  box-shadow: inset 0 0 0 3px #fff;
}

.mz-reqs li.is-bad {
  color: var(--mz-err);
}

.mz-reqs li.is-bad::before {
  border-color: var(--mz-err);
  background: var(--mz-err);
  box-shadow: inset 0 0 0 3px #fff;
}

.mz-warn-strip {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--mz-warn-bg);
  border: 1px solid #f0dcb0;
  color: var(--mz-warn);
  font-size: 13px;
}

/* ── هوية المستخدم في لوحة التحكم ───────────────────────────────────── */
.mz-id {
  background: linear-gradient(160deg, var(--mz-navy) 0%, var(--mz-navy-3) 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  margin: 0 -14px 14px;
  padding: 20px 18px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--mz-shadow-lg);
}

.mz-id-avatar {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  border: 1.5px solid rgba(200, 162, 74, .6);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--mz-gold-soft);
  overflow: hidden;
}

.mz-id-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mz-id-text {
  flex: 1;
  min-width: 0;
}

.mz-id-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.mz-id-role {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--mz-gold-soft);
}

.mz-id-dept {
  margin: 1px 0 0;
  font-size: 11.5px;
  color: #c9d7ef;
}

.mz-id-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.mz-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mz-icon-btn:active {
  background: rgba(255, 255, 255, .24);
}

.mz-icon-btn--logout {
  border-color: rgba(242, 201, 199, .4);
  color: #fbd6d5;
}

/* ── شريط التبويبات ─────────────────────────────────────────────────── */
.mz-tab-bar {
  display: flex;
  background: #fff;
  border: 1px solid var(--mz-line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
  box-shadow: var(--mz-shadow);
  gap: 4px;
}

.mz-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  border: 0;
  background: transparent;
  color: var(--mz-ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all .18s ease;
}

.mz-tab-btn.is-active {
  background: var(--mz-navy);
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 43, 92, .24);
}

.mz-tab-content {
  display: none;
  animation: mzIn .2s ease-out;
}

.mz-tab-content.is-active {
  display: block;
}

/* ── شريط البحث ─────────────────────────────────────────────────────── */
.mz-search-box {
  margin-bottom: 12px;
}

.mz-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mz-search-icon {
  position: absolute;
  inset-inline-start: 13px;
  color: var(--mz-ink-3);
  pointer-events: none;
}

.mz-search-input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 38px;
  font-size: 14.5px;
  font-family: inherit;
  border: 1.5px solid var(--mz-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mz-ink);
  outline: none;
  box-shadow: var(--mz-shadow);
  transition: border-color .15s, box-shadow .15s;
}

.mz-search-input:focus {
  border-color: var(--mz-navy-3);
  box-shadow: 0 0 0 3px rgba(30, 78, 151, .12);
}

.mz-search-clear {
  position: absolute;
  inset-inline-end: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 0;
  background: #eef2f8;
  color: var(--mz-ink-2);
  font-size: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ── فلاتر الحالة ───────────────────────────────────────────────────── */
.mz-filter-pills {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.mz-filter-pills::-webkit-scrollbar {
  display: none;
}

.mz-pill {
  flex: 0 0 auto;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--mz-line);
  background: #fff;
  color: var(--mz-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.mz-pill.is-active {
  background: var(--mz-navy);
  color: #fff;
  border-color: var(--mz-navy);
}

.mz-pill--ok.is-active {
  background: var(--mz-ok);
  border-color: var(--mz-ok);
}

.mz-pill--err.is-active {
  background: var(--mz-err);
  border-color: var(--mz-err);
}

.mz-pill--warn.is-active {
  background: var(--mz-warn);
  border-color: var(--mz-warn);
}

/* ── بطاقات المراكب (Vessels Cards) ─────────────────────────────────── */
.mz-vessels-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mz-vcard {
  background: #fff;
  border: 1px solid var(--mz-line);
  border-radius: 13px;
  padding: 13px 14px;
  box-shadow: var(--mz-shadow);
  cursor: pointer;
  transition: transform .08s, box-shadow .15s, border-color .15s;
}

.mz-vcard:active {
  transform: scale(.99);
}

.mz-vcard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mz-vcard-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--mz-navy);
}

.mz-vcard-reg {
  font-size: 12.5px;
  color: var(--mz-ink-2);
  direction: ltr;
  display: inline-block;
}

.mz-vbadge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.mz-vbadge--ok {
  background: var(--mz-ok-bg);
  color: var(--mz-ok);
  border: 1px solid #bfe6d4;
}

.mz-vbadge--err {
  background: var(--mz-err-bg);
  color: var(--mz-err);
  border: 1px solid #f2c9c7;
}

.mz-vbadge--warn {
  background: var(--mz-warn-bg);
  color: var(--mz-warn);
  border: 1px solid #f0dcb0;
}

.mz-vcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--mz-ink-2);
  border-top: 1px dashed #edf1f7;
  padding-top: 8px;
  margin-top: 6px;
}

.mz-vcard-grid span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── البطاقات الإحصائية ─────────────────────────────────────────────── */
.mz-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.mz-stat {
  background: #fff;
  border: 1px solid var(--mz-line);
  border-radius: 12px;
  padding: 11px 4px;
  text-align: center;
  box-shadow: var(--mz-shadow);
}

.mz-stat-num {
  display: block;
  font-size: 19px;
  font-weight: 700;
  color: var(--mz-navy);
}

.mz-stat-lbl {
  display: block;
  font-size: 10.5px;
  color: var(--mz-ink-3);
  margin-top: 1px;
}

.mz-stat--ok .mz-stat-num {
  color: var(--mz-ok);
}

.mz-stat--err .mz-stat-num {
  color: var(--mz-err);
}

.mz-panel-note {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
  background: var(--mz-warn-bg);
  border: 1px solid #f0dcb0;
  color: var(--mz-warn);
}

/* ── الوسوم ─────────────────────────────────────────────────────────── */
.mz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.mz-tag {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--mz-line);
  color: var(--mz-ink-2);
}

.mz-tag--channel {
  background: var(--mz-ok-bg);
  border-color: #bfe6d4;
  color: var(--mz-ok);
  font-weight: 700;
}

/* ── مجموعات الصلاحيات ──────────────────────────────────────────────── */
.mz-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mz-group {
  background: #fff;
  border: 1px solid var(--mz-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--mz-shadow);
}

.mz-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  background: #f6f9fd;
  border-bottom: 1px solid var(--mz-line);
}

.mz-group-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--mz-navy);
}

.mz-group-count {
  font-size: 11.5px;
  color: var(--mz-ink-2);
  background: #fff;
  border: 1px solid var(--mz-line);
  border-radius: 999px;
  padding: 1px 9px;
}

.mz-perm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border-bottom: 1px solid #f0f4fa;
}

.mz-perm:last-child {
  border-bottom: 0;
}

.mz-perm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex: 0 0 auto;
  background: var(--mz-navy-3);
}

.mz-perm.is-sensitive .mz-perm-dot {
  background: var(--mz-gold);
}

.mz-perm-body {
  flex: 1;
  min-width: 0;
}

.mz-perm-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mz-ink);
}

.mz-perm-desc {
  font-size: 11.5px;
  color: var(--mz-ink-3);
  margin-top: 1px;
}

.mz-perm-code {
  font-size: 10.5px;
  color: var(--mz-ink-3);
  direction: ltr;
  text-align: left;
  margin-top: 2px;
}

.mz-perm-flags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex: 0 0 auto;
}

.mz-flag {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--mz-line);
  background: #fff;
  color: var(--mz-ink-2);
  white-space: nowrap;
}

.mz-flag--sensitive {
  background: var(--mz-warn-bg);
  border-color: #f0dcb0;
  color: var(--mz-warn);
  font-weight: 700;
}

.mz-flag--role {
  background: #eaf1fb;
  border-color: #cfdff5;
  color: var(--mz-navy-2);
}

.mz-empty {
  text-align: center;
  color: var(--mz-ink-3);
  font-size: 13px;
  padding: 22px 10px;
}

/* ── بطاقة الجلسة ───────────────────────────────────────────────────── */
.mz-session-card {
  background: #fff;
  border: 1px solid var(--mz-line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
  box-shadow: var(--mz-shadow);
}

.mz-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--mz-navy);
  font-weight: 700;
}

.mz-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
}

.mz-dl dt {
  font-size: 12.5px;
  color: var(--mz-ink-3);
}

.mz-dl dd {
  margin: 0;
  font-size: 12.5px;
  color: var(--mz-ink);
  word-break: break-word;
}

/* ── قائمة التراخيص ─────────────────────────────────────────────────── */
.mz-licenses-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mz-lcard {
  border: 1px solid #edf1f7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafbfd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.mz-lcard-title {
  font-weight: 700;
  color: var(--mz-navy);
  margin-bottom: 2px;
}

.mz-lcard-sub {
  font-size: 11.5px;
  color: var(--mz-ink-3);
}

/* ── الحالة الفارغة والتحميل ────────────────────────────────────────── */
.mz-loading-state {
  text-align: center;
  padding: 30px 15px;
  color: var(--mz-ink-3);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ── النافذة المنبثقة (Bottom Sheet Modal) ───────────────────────────── */
.mz-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.mz-modal[hidden] {
  display: none !important;
}

.mz-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 43, 92, .5);
  backdrop-filter: blur(3px);
  animation: mzFadeIn .2s ease-out;
}

.mz-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 18px 18px 30px;
  overflow-y: auto;
  box-shadow: var(--mz-shadow-lg);
  animation: mzSlideUp .25s ease-out;
}

@keyframes mzFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mzSlideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.mz-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--mz-line);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.mz-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mz-modal-title {
  margin: 0;
  font-size: 17.5px;
  color: var(--mz-navy);
  font-weight: 700;
}

.mz-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #eef2f8;
  color: var(--mz-ink-2);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.mz-modal-body {
  font-size: 13.5px;
}

/* ── التنبيه العائم ─────────────────────────────────────────────────── */
.mz-toast {
  position: fixed;
  inset-inline: 14px;
  bottom: 18px;
  max-width: 520px;
  margin: 0 auto;
  padding: 11px 15px;
  border-radius: 11px;
  font-size: 13.5px;
  color: #fff;
  background: var(--mz-navy);
  box-shadow: var(--mz-shadow-lg);
  z-index: 1001;
  animation: mzToastIn .2s ease-out;
}

.mz-toast--err {
  background: var(--mz-err);
}

.mz-toast--ok {
  background: var(--mz-ok);
}

@keyframes mzToastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ── الشاشات الصغيرة جداً ───────────────────────────────────────────── */
@media (max-width: 340px) {
  .mz-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .mz-hero-title {
    font-size: 18px;
  }

  .mz-tab-btn span {
    font-size: 12px;
  }
}

/* ── تقليل الحركة ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}