/**
 * AXION™ (أكسيون) | Nabdh Alfahs (نبض الفحص) — Professional Mobile PWA Design System
 * Strictly adheres to the saved methodology:
 * 1. Light background with subtle glassmorphic effect (Light Glassmorphism)
 * 2. Translucent white cards with rounded corners
 * 3. Colorful iOS-style squircle icons
 * 4. Strictly 'Times New Roman' typography across all elements
 * 5. Large touch-friendly buttons
 * 6. Fixed bottom navigation bar
 * 7. Zero horizontal scrolling
 */

:root {
  --font-main: "Times New Roman", Times, Georgia, serif;
  --bg-gradient: linear-gradient(160deg, #eff4fb 0%, #e4edf8 48%, #f5f8fc 100%);
  --glass-card: rgba(255, 255, 255, 0.80);
  --glass-card-strong: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-shadow: 0 12px 32px rgba(15, 35, 65, 0.065), 0 2px 8px rgba(15, 35, 65, 0.035);
  --text-dark: #0b192c;
  --text-secondary: #3b4d66;
  --text-muted: #64748b;

  /* iOS Vibrant Accent Palette */
  --ios-blue: #007aff;
  --ios-green: #34c759;
  --ios-orange: #ff9500;
  --ios-red: #ff3b30;
  --ios-purple: #af52de;
  --ios-teal: #5ac8fa;
  --ios-indigo: #5856d6;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-main) !important;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-dark);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Soft Ambient Glassmorphic Blobs */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}

.blob-1 {
  width: 280px;
  height: 280px;
  background: rgba(0, 122, 255, 0.20);
  top: -70px;
  right: -50px;
}

.blob-2 {
  width: 260px;
  height: 260px;
  background: rgba(52, 199, 89, 0.16);
  bottom: 110px;
  left: -60px;
}

.blob-3 {
  width: 220px;
  height: 220px;
  background: rgba(175, 82, 222, 0.14);
  top: 38%;
  right: 20%;
}

/* Mobile App Frame (Centered Phone Viewport on Desktop, Full Bleed on Mobile) */
.pwa-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 108px;
  min-height: 100vh;
}

@media (min-width: 520px) {
  .pwa-shell {
    box-shadow: 0 0 60px rgba(15, 23, 42, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    border-left: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.22);
  }
}

/* Sticky Glass Header with AXION + Nabdh Alfahs Brand Identity */
.pwa-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.95);
  padding: 12px 14px 12px;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  border-radius: 0 0 24px 24px;
}

.axion-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.axion-logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.axion-emblem-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0066df, #0b2948);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 102, 223, 0.25);
  padding: 6px;
}

.axion-logo-img,
.logo-white {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
  -webkit-filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.axion-brand-text {
  min-width: 0;
}

.axion-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.axion-name-ar {
  font-size: 22px;
  font-weight: bold;
  color: #0b192c;
}

.axion-divider {
  color: #cbd5e1;
  font-weight: bold;
}

.axion-sub-badge {
  font-size: 17px;
  font-weight: bold;
  color: #007aff;
}

.nabdh-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: bold;
  color: var(--text-secondary);
  margin-top: 2px;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ios-green);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.22);
  display: inline-block;
}

/* Active User Strip */
.active-user-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  padding: 8px 10px;
  border-radius: 15px;
}

.sync-live-tag {
  font-size: 12px;
  font-weight: bold;
  color: #15803d;
  background: rgba(52, 199, 89, 0.14);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.brand-user-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* iOS Style Squircle Icons */
.ios-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 20px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.ios-icon.blue { background: linear-gradient(135deg, #3898ff, #007aff); }
.ios-icon.green { background: linear-gradient(135deg, #4cd964, #28b446); }
.ios-icon.orange { background: linear-gradient(135deg, #ffb340, #ff9500); }
.ios-icon.red { background: linear-gradient(135deg, #ff6961, #ff3b30); }
.ios-icon.purple { background: linear-gradient(135deg, #c67aff, #9b35ce); }
.ios-icon.indigo { background: linear-gradient(135deg, #7a78ff, #5856d6); }
.ios-icon.teal { background: linear-gradient(135deg, #64d2ff, #0091ea); }

.user-meta {
  min-width: 0;
}

.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: bold;
  color: var(--ios-blue);
}

.user-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-pill-btn {
  position: relative;
  height: 42px;
  min-width: 42px;
  padding: 0 11px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  transition: transform 0.15s ease;
}

.icon-pill-btn:active {
  transform: scale(0.95);
}

.notif-dot-count {
  position: absolute;
  top: -5px;
  left: -5px;
  background: var(--ios-red);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.4);
}

/* Segmented Role Switcher */
.role-switcher-strip {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: rgba(226, 232, 240, 0.65);
  padding: 5px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.role-chip {
  border: none;
  background: transparent;
  padding: 8px 6px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.role-chip.active {
  background: #ffffff;
  color: var(--text-dark);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.10);
}

/* Main Content Area */
.pwa-main {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Translucent White Glass Cards with Rounded Corners */
.glass-card {
  background: var(--glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--glass-shadow);
  width: 100%;
  overflow: hidden;
}

.glass-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--text-dark);
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* KPI Grid (2x2 Mobile Widget Layout) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi-box {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(15, 35, 65, 0.05);
}

.kpi-info {
  min-width: 0;
}

.kpi-value {
  font-size: 21px;
  font-weight: bold;
  color: var(--text-dark);
  line-height: 1.2;
}

.kpi-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Large Touch-Friendly Buttons */
.touch-btn {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border-radius: 16px;
  border: none;
  font-size: 16px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.touch-btn:active {
  transform: scale(0.97);
}

.touch-btn.primary {
  background: linear-gradient(135deg, #258aff, #0066df);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.25);
}

.touch-btn.success {
  background: linear-gradient(135deg, #34c759, #249e44);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(52, 199, 89, 0.25);
}

.touch-btn.warning {
  background: linear-gradient(135deg, #ff9f0a, #e68600);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 149, 0, 0.25);
}

.touch-btn.purple {
  background: linear-gradient(135deg, #b865e6, #8f35c4);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(175, 82, 222, 0.25);
}

.touch-btn.danger {
  background: linear-gradient(135deg, #ff5b52, #e0281e);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 59, 48, 0.22);
}

.touch-btn.soft {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-dark);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.btn-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

/* Job / Operation Item Card */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-item-card {
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

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

.job-vehicle {
  font-size: 17px;
  font-weight: bold;
  color: var(--text-dark);
}

.job-customer {
  font-size: 13px;
  color: var(--text-secondary);
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}

.status-pill.in-progress {
  background: rgba(0, 122, 255, 0.12);
  color: var(--ios-blue);
}

.status-pill.completed {
  background: rgba(52, 199, 89, 0.14);
  color: #1d8f3a;
}

.status-pill.pending {
  background: rgba(255, 149, 0, 0.15);
  color: #c97300;
}

.job-diagnosis {
  font-size: 14px;
  color: var(--text-dark);
  background: rgba(241, 245, 249, 0.9);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 8px 0;
  line-height: 1.5;
}

.works-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.work-tag {
  font-size: 12px;
  background: rgba(0, 122, 255, 0.08);
  color: #0055b3;
  padding: 4px 9px;
  border-radius: 9px;
}

/* Forms */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.96);
  font-size: 16px;
  color: var(--text-dark);
  outline: none;
}

.form-textarea {
  min-height: 82px;
  resize: vertical;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Notification Cards */
.notif-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.notif-card.unread {
  border-right: 4px solid var(--ios-blue);
  background: #ffffff;
}

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

.notif-title {
  font-size: 16px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 3px;
}

.notif-msg {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 6px;
}

.notif-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Fixed Bottom Navigation Bar (iOS Floating Dock Style) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border-top: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.08);
  padding: 7px 10px calc(8px + env(safe-area-inset-bottom, 0px));
}

.bottom-nav-inner {
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nav-tab {
  border: none;
  background: transparent;
  min-height: 54px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.nav-tab .tab-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all 0.2s ease;
}

.nav-tab.active {
  color: var(--ios-blue);
  background: rgba(0, 122, 255, 0.08);
}

.nav-tab.active .tab-icon {
  background: linear-gradient(135deg, #3898ff, #007aff);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.32);
}

.tab-badge {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  background: var(--ios-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid #ffffff;
}

/* Modal Sheet (iOS Bottom Sheet with Drag Handle) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(25px);
  border-radius: 26px 26px 0 0;
  padding: 12px 18px 28px;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
  animation: slideUp 0.22s ease-out;
}

.modal-drag-handle {
  width: 42px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 999px;
  margin: 0 auto 14px;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Toast Notification Banner */
.live-toast {
  position: fixed;
  top: 14px;
  right: 14px;
  left: 14px;
  max-width: 452px;
  margin: 0 auto;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 122, 255, 0.25);
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.16);
  display: none;
  align-items: center;
  gap: 12px;
}

.live-toast.show {
  display: flex;
}

@media (max-width: 360px) {
  .btn-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Technician Profile & Work Orders Styling */
.status-pill.in-repair {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-pill.in-repair i {
  color: #ea580c;
}

.tech-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 247, 255, 0.9));
  border: 1.5px solid rgba(0, 122, 255, 0.22);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(0, 102, 223, 0.06);
}

.tech-account-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #007aff, #004fb0);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
}

.tech-selector-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: hidden;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.tech-chip {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
}

.tech-chip.active {
  background: #007aff;
  color: #ffffff;
  border-color: #007aff;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.tech-chip-avatar {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}
.tech-chip.active .tech-chip-avatar {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Interactive Work Orders Checklist */
.wo-checklist-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
}

.wo-checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wo-checklist-title {
  font-size: 13.5px;
  font-weight: bold;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wo-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.wo-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #34c759, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.wo-task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.wo-task-item:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.wo-task-item.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.wo-task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 12px;
  transition: all 0.2s;
}

.wo-task-item.done .wo-task-checkbox {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

.wo-task-content {
  flex: 1;
  min-width: 0;
}

.wo-task-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.wo-task-item.done .wo-task-name {
  text-decoration: line-through;
  color: #64748b;
}

.wo-task-category {
  font-size: 11px;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 1px 6px;
  border-radius: 5px;
  display: inline-block;
  margin-top: 3px;
  font-weight: 500;
}

.wo-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.wo-meta-tag {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================================
   LANGUAGE SWITCHER (AR ⇄ EN) & STRICT ZERO-HORIZONTAL-SCROLL ENFORCEMENT
   ============================================================================ */
html,
body,
.pwa-shell,
.pwa-main,
.pwa-header,
.glass-card,
.job-item-card,
.notif-item,
.action-modal-sheet {
  max-width: 100%;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.pwa-main *,
.action-modal-sheet * {
  max-width: 100%;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0b2948, #0066df);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  font-family: 'Times New Roman', Times, serif;
  font-size: 12.5px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 102, 223, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.lang-toggle-btn:active {
  transform: scale(0.95);
}

.lang-toggle-btn i {
  font-size: 13px;
  color: #7dd3fc;
}

/* Bidirectional Support when switched to English (LTR) */
html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .job-diagnosis {
  border-right: none;
  border-left: 3px solid var(--ios-blue);
  text-align: left;
}

html[dir="ltr"] .notif-changes-box {
  border-right: none;
  border-left: 3px solid var(--ios-orange);
}

html[dir="ltr"] .header-notif-count {
  left: auto;
  right: -4px;
}

html[dir="ltr"] .nav-badge {
  left: auto;
  right: calc(50% - 22px);
}

@media (max-width: 400px) {
  .brand-title {
    font-size: 17px;
  }
  .brand-title span {
    font-size: 10.5px;
    padding: 2px 7px;
  }
  .header-send-btn span {
    display: none;
  }
  .header-send-btn {
    padding: 8px 10px;
  }
  .role-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
