@font-face {
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url("/assets/material-symbols-rounded-DwJoZgbj.woff2") format("woff2");
}
.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga";
}
/* ===== Salt — نظام النوافذ المنبثقة ===== */

.salt-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--salt-modal-z, 9999);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  touch-action: none;
  overscroll-behavior: contain;
  transition:
    background 0.35s cubic-bezier(0.32, 0.72, 0, 1),
    backdrop-filter 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.salt-modal-overlay.is-visible {
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
}

.salt-modal-panel {
  --modal-accent: var(--salt-modal-accent, #006a60);
  position: relative;
  width: min(100%, var(--salt-modal-max-w, 400px));
  max-height: min(85dvh, var(--salt-modal-max-h, 85dvh));
  display: flex;
  flex-direction: column;
  direction: rtl;
  background: var(--salt-modal-bg, #1e1e22);
  border-radius: var(--app-radius, 24px);
  border: 1px solid color-mix(in srgb, var(--modal-accent) 12%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, white 6%, transparent) inset,
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.18),
    0 32px 64px rgba(0, 0, 0, 0.28),
    0 0 80px -20px color-mix(in srgb, var(--modal-accent) 25%, transparent);
  opacity: 0;
  transform: scale(0.94) translateY(16px);
  transition:
    opacity 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
  overflow: hidden;
  touch-action: pan-y;
}

.salt-modal-panel.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.salt-modal-panel--sheet {
  --salt-modal-max-w: 340px;
}

.salt-modal-grab {
  flex-shrink: 0;
  width: 36px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 99px;
  background: color-mix(in srgb, var(--modal-accent) 35%, transparent);
  opacity: 0.7;
}

.salt-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 16px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--modal-accent) 14%, transparent) 0%,
    transparent 100%
  );
  border-bottom: 1px solid color-mix(in srgb, var(--modal-accent) 10%, transparent);
}

.salt-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: calc(var(--app-radius, 16px) * 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--modal-accent) 18%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--modal-accent) 22%, transparent);
}

.salt-modal-icon .material-symbols-rounded {
  font-size: 26px;
  color: var(--modal-accent);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.salt-modal-icon--danger {
  background: color-mix(in srgb, var(--modal-accent) 14%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--modal-accent) 18%, transparent);
}

.salt-modal-title-wrap {
  flex: 1;
  min-width: 0;
}

.salt-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--salt-modal-on-surface, #e8e8ec);
  font-family: inherit;
}

.salt-modal-title--danger {
  color: var(--modal-accent);
}

.salt-modal-subtitle {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--salt-modal-muted, #9a9aa4);
  line-height: 1.4;
}

.salt-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  background: color-mix(in srgb, var(--salt-modal-on-surface, #fff) 8%, transparent);
  color: var(--salt-modal-muted, #9a9aa4);
  transition: background 0.2s, color 0.2s, transform 0.15s;
  font-family: inherit;
}

.salt-modal-close:active {
  transform: scale(0.92);
}

.salt-modal-close:hover {
  background: color-mix(in srgb, var(--salt-modal-on-surface, #fff) 12%, transparent);
  color: var(--salt-modal-on-surface, #e8e8ec);
}

.salt-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--salt-modal-on-surface, #e8e8ec);
  scrollbar-width: thin;
}

.salt-modal-body.hide-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.salt-modal-body.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.salt-modal-footer {
  flex-shrink: 0;
  padding: 4px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* قائمة إجراءات (قائمة سياق / مصنع) */
.salt-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px 16px;
}

.salt-modal-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: calc(var(--app-radius, 16px) * 0.75);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s, background 0.2s;
  text-align: right;
  direction: rtl;
}

.salt-modal-action:active {
  transform: scale(0.98);
}

.salt-modal-action--default {
  background: color-mix(in srgb, var(--salt-modal-on-surface, #fff) 8%, transparent);
  color: var(--salt-modal-on-surface, #e8e8ec);
}

.salt-modal-action--default:hover {
  background: color-mix(in srgb, var(--salt-modal-on-surface, #fff) 12%, transparent);
}

.salt-modal-action--danger {
  background: color-mix(in srgb, var(--modal-accent) 18%, transparent);
  color: var(--modal-accent);
}

.salt-modal-action--danger:hover {
  filter: brightness(1.08);
}

.salt-modal-action .material-symbols-rounded {
  font-size: 22px;
  font-variation-settings: 'FILL' 1, 'wght' 500;
}

.salt-modal-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 8px 12px 16px;
}

.salt-modal-action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border: none;
  border-radius: calc(var(--app-radius, 16px) * 0.75);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s;
}

.salt-modal-action-tile:active {
  transform: scale(0.96);
}

.salt-modal-action-tile--default {
  background: color-mix(in srgb, var(--salt-modal-on-surface, #fff) 8%, transparent);
  color: var(--salt-modal-on-surface, #e8e8ec);
}

.salt-modal-action-tile--danger {
  background: color-mix(in srgb, var(--modal-accent) 18%, transparent);
  color: var(--modal-accent);
}

.salt-modal-action-tile span:last-child {
  font-size: 0.8125rem;
  font-weight: 700;
}

.salt-modal-action-tile .material-symbols-rounded {
  font-size: 26px;
}

/* حقول داخل النافذة */
.salt-modal-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.salt-modal-field-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--salt-modal-muted, #9a9aa4);
  letter-spacing: 0.02em;
}

.salt-modal-date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: calc(var(--app-radius, 16px) * 0.75);
  border: 1px solid color-mix(in srgb, var(--modal-accent) 20%, transparent);
  background: color-mix(in srgb, var(--salt-modal-on-surface, #fff) 5%, transparent);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.salt-modal-date-trigger:hover {
  border-color: color-mix(in srgb, var(--modal-accent) 40%, transparent);
  background: color-mix(in srgb, var(--modal-accent) 8%, transparent);
}

.salt-modal-workers-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.salt-modal-workers-row > * {
  flex: 1;
  min-width: 0;
}

@media (max-width: 380px) {
  .salt-modal-workers-row {
    flex-direction: column;
  }
}

.salt-modal-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.salt-modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px 4px;
}

.salt-modal-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--modal-accent) 12%, transparent);
}

.salt-modal-empty-icon .material-symbols-rounded {
  font-size: 40px;
  color: var(--salt-modal-muted, #9a9aa4);
  font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 48;
}

.salt-modal-empty-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--salt-modal-on-surface, #e8e8ec);
  margin-bottom: 8px;
}

.salt-modal-empty-desc {
  font-size: 0.8125rem;
  color: var(--salt-modal-muted, #9a9aa4);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 280px;
}
