.operator-modal-backdrop {
  background: rgba(31, 36, 58, .48);
  backdrop-filter: blur(4px);
  padding: 14px;
}

.operator-modal-backdrop .operator-form-card {
  box-sizing: border-box;
  width: min(790px, 94vw);
  max-height: 88vh;
  overflow: auto;
  margin: 0;
  padding: 0 14px 12px;
  border: 1px solid #e6e4ff;
  border-top: 4px solid #6658e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(35, 31, 91, .22);
}

.operator-modal-backdrop .operator-form-card .panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 45px;
  margin: 0 -14px 9px;
  padding: 7px 14px;
  border-bottom: 1px solid #ecebfa;
  background: linear-gradient(135deg, #f5f3ff, #fff);
  align-items: center;
}

.operator-modal-backdrop .operator-form-card .panel-head h2 {
  margin: 0 0 2px;
  color: #38336b;
  font-size: 14px;
}

.operator-modal-backdrop .operator-form-card .panel-head span {
  color: #8b89a3;
  font-size: 9px;
}

.operator-modal-backdrop .operator-form-card .close-modal {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #eeecff;
  color: #5b50d5;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.operator-modal-backdrop .operator-form-card .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
}

.operator-modal-backdrop .operator-form-card .form-grid label {
  display: block;
  min-width: 0;
  color: #66647d;
  font-size: 9px;
  line-height: 1.35;
}

.operator-modal-backdrop .operator-form-card .form-grid input,
.operator-modal-backdrop .operator-form-card .form-grid select {
  box-sizing: border-box;
  width: 100%;
  height: 26px;
  margin-top: 2px;
  padding: 3px 7px;
  border: 1px solid #e1e2ee;
  border-radius: 6px;
  outline: 0;
  background: #fbfbfe;
  color: #30334a;
  font: 10px Vazirmatn;
}

.operator-modal-backdrop .operator-form-card .form-grid input:focus,
.operator-modal-backdrop .operator-form-card .form-grid select:focus {
  border-color: #8177ed;
  background: #fff;
  box-shadow: 0 0 0 2px #8177ed1f;
}

.operator-modal-backdrop .operator-form-card .operator-photo {
  width: 96px;
  height: 96px;
  margin: 1px 0 5px 12px;
  border: 1px dashed #aaa3ed;
  border-radius: 12px;
  background: #faf9ff;
  color: #9692b0;
  box-shadow: 0 4px 12px #6658e814;
}

.operator-modal-backdrop .operator-form-card .operator-notes {
  margin-top: 7px;
  color: #66647d;
  font-size: 9px;
}

.operator-modal-backdrop .operator-form-card .operator-notes textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  margin-top: 3px;
  padding: 5px 7px;
  border: 1px solid #e1e2ee;
  border-radius: 6px;
  background: #fbfbfe;
  font: 10px Vazirmatn;
  resize: vertical;
}

.operator-modal-backdrop .operator-form-card .modal-actions {
  gap: 7px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eeeef6;
}

.operator-modal-backdrop .operator-form-card .modal-actions button {
  height: 28px;
  padding: 4px 13px;
  border-radius: 7px;
  font-size: 9px;
}

@media (max-width: 700px) {
  .operator-modal-backdrop .operator-form-card .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .operator-modal-backdrop .operator-form-card .form-grid {
    grid-template-columns: 1fr;
  }

  .operator-modal-backdrop .operator-form-card .operator-photo {
    float: none;
    margin: 0 0 7px auto;
  }
}

/* Modern compact operator form */
.operator-modal-backdrop {
  background: rgba(20, 24, 42, .56);
}

.operator-modal-backdrop .operator-form-card {
  width: min(820px, 94vw);
  padding: 0 18px 14px;
  border: 0;
  border-top: 3px solid #6558e8;
  border-radius: 20px;
  background: #f8f9fd;
  box-shadow: 0 28px 80px rgba(25, 29, 67, .28);
}

.operator-modal-backdrop .operator-form-card .panel-head {
  min-height: 52px;
  margin: 0 -18px 12px;
  padding: 9px 18px;
  border: 0;
  border-bottom: 1px solid #e9eaf4;
  background: #fff;
}

.operator-modal-backdrop .operator-form-card .panel-head h2 {
  color: #252a43;
  font-size: 15px;
  font-weight: 800;
}

.operator-modal-backdrop .operator-form-card .panel-head span {
  color: #8d93a7;
  font-size: 9px;
}

.operator-modal-backdrop .operator-form-card .form-grid {
  padding: 12px;
  border: 1px solid #eaebf3;
  border-radius: 14px;
  background: #fff;
  gap: 9px 10px;
}

.operator-modal-backdrop .operator-form-card .form-grid label {
  color: #73798d;
  font-size: 9px;
  font-weight: 600;
}

.operator-modal-backdrop .operator-form-card .form-grid input,
.operator-modal-backdrop .operator-form-card .form-grid select {
  height: 30px;
  margin-top: 4px;
  padding: 5px 9px;
  border: 1px solid #e2e4ed;
  border-radius: 8px;
  background: #f9faff;
  color: #282d42;
  font-size: 10px;
  box-shadow: inset 0 1px 2px rgba(35, 40, 72, .025);
}

.operator-modal-backdrop .operator-form-card .form-grid input:hover,
.operator-modal-backdrop .operator-form-card .form-grid select:hover {
  border-color: #cfd1e3;
  background: #fff;
}

.operator-modal-backdrop .operator-form-card .form-grid input:focus,
.operator-modal-backdrop .operator-form-card .form-grid select:focus {
  border-color: #7569ed;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(117, 105, 237, .12);
}

.operator-modal-backdrop .operator-form-card .operator-photo {
  width: 104px;
  height: 104px;
  margin: 0 0 8px 0;
  border: 1px solid #d8d5ff;
  border-radius: 16px;
  background: linear-gradient(145deg, #f1efff, #fff);
  color: #6a60d7;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(101, 88, 232, .12);
}

.operator-modal-backdrop .operator-form-card .operator-photo::after {
  content: 'برای افزودن عکس کلیک کنید';
  position: absolute;
  right: 7px;
  bottom: 7px;
  left: 7px;
  padding: 4px 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .88);
  color: #665ce0;
  font-size: 7px;
  text-align: center;
}

.operator-modal-backdrop .operator-form-card .operator-photo img {
  z-index: 1;
}

.operator-modal-backdrop .operator-form-card .operator-photo input {
  z-index: 3;
}

/* Shared calendar button: compact, neutral and consistent everywhere */
.novin-calendar-field {
  gap: 5px !important;
}

.novin-calendar-field .novin-calendar-trigger,
.attendance-calendar-button,
.receipt-date-wrap > [data-shared-calendar-trigger],
.jalali-date-field > [data-shared-calendar-trigger],
button[data-shared-calendar-trigger] {
  display: inline-grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e1e3ec !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #777d91 !important;
  font: 14px/1 Vazirmatn !important;
  box-shadow: 0 1px 3px rgba(30, 35, 65, .05) !important;
  cursor: pointer !important;
  transition: background .15s, border-color .15s, color .15s !important;
}

.novin-calendar-field .novin-calendar-trigger:hover,
.attendance-calendar-button:hover,
.receipt-date-wrap > [data-shared-calendar-trigger]:hover,
.jalali-date-field > [data-shared-calendar-trigger]:hover,
button[data-shared-calendar-trigger]:hover {
  border-color: #b9b4f2 !important;
  background: #f4f2ff !important;
  color: #5f55d7 !important;
}

.operator-modal-backdrop .operator-form-card .novin-calendar-field .novin-calendar-trigger {
  width: 26px !important;
  height: 26px !important;
  flex-basis: 26px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

.operator-modal-backdrop .operator-form-card .operator-notes {
  margin-top: 10px;
  color: #73798d;
  font-weight: 600;
}

.operator-modal-backdrop .operator-form-card .operator-notes textarea {
  min-height: 42px;
  margin-top: 4px;
  padding: 7px 9px;
  border: 1px solid #e2e4ed;
  border-radius: 8px;
  background: #fff;
  outline: 0;
}

.operator-modal-backdrop .operator-form-card .operator-notes textarea:focus {
  border-color: #7569ed;
  box-shadow: 0 0 0 3px rgba(117, 105, 237, .12);
}

.operator-modal-backdrop .operator-form-card .modal-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e7e8f1;
}

.operator-modal-backdrop .operator-form-card .modal-actions .primary-btn {
  min-width: 112px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7165ee, #5549d2);
  box-shadow: 0 7px 15px rgba(101, 88, 232, .2);
}

.operator-modal-backdrop .operator-form-card .modal-actions .filter-btn {
  border-radius: 9px;
  background: #fff !important;
  border-color: #e0e1eb !important;
  color: #73798d !important;
}

/* Wide, no-scroll desktop layout */
.operator-modal-backdrop {
  overflow: hidden;
  align-items: center;
}

.operator-modal-backdrop .operator-form-card {
  width: min(960px, 96vw);
  max-width: 960px;
  height: auto;
  max-height: calc(100vh - 28px);
  overflow: hidden;
  padding: 0 20px 12px;
}

.operator-modal-backdrop .operator-form-card .panel-head {
  margin-right: -20px;
  margin-left: -20px;
  padding-right: 20px;
  padding-left: 20px;
}

.operator-modal-backdrop .operator-form-card .form-grid {
  gap: 6px 12px;
  padding: 10px 12px;
}

.operator-modal-backdrop .operator-form-card .form-grid input,
.operator-modal-backdrop .operator-form-card .form-grid select {
  height: 27px;
  margin-top: 2px;
}

.operator-modal-backdrop .operator-form-card .operator-photo {
  width: 112px;
  height: 112px;
  margin-left: -2px;
}

.operator-modal-backdrop .operator-form-card .operator-notes textarea {
  min-height: 34px;
  height: 34px;
}

.operator-modal-backdrop .operator-form-card .modal-actions {
  margin-top: 8px;
  padding-top: 7px;
}

.operator-modal-backdrop .operator-form-card .operator-birth-age {
  display: block;
  min-height: 11px;
  margin-top: 2px;
  color: #8b93a7;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.2;
}

.operator-modal-backdrop .operator-form-card .operator-birth-age:empty {
  display: none;
}

@media (min-width: 701px) {
  .operator-modal-backdrop .operator-form-card .form-grid .operator-process-field {
    grid-column: 1;
    grid-row: 7;
  }

  .operator-modal-backdrop .operator-form-card .form-grid .operator-start-field {
    grid-column: 3;
    grid-row: 7;
  }
}

/* Operator page: keep the page fixed and scroll only the operator list. */
@media (min-width: 701px) {
  html:has(#operators.active-view),
  body:has(#operators.active-view) {
    height: 100%;
    overflow: hidden;
  }

  body:has(#operators.active-view) .app-shell,
  body:has(#operators.active-view) .main-content {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  body:has(#operators.active-view) .main-content {
    padding-bottom: 0;
  }

  #operators.active-view {
    height: calc(100vh - 76px);
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #operators.active-view > .page-heading {
    flex: 0 0 auto;
  }

  #operators.active-view > .operator-layout {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
  }

  #operators.active-view > .operator-layout > .operator-list-card {
    grid-column: 1 / -1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #operators.active-view .operator-list-card > .panel-head {
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
  }

  #operators.active-view .operator-list-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    direction: ltr;
  }

  #operators.active-view .operator-list-tools .searchbox {
    flex: 0 1 190px;
    width: 190px;
    min-width: 120px;
    padding: 8px 10px;
  }

  #operators.active-view .operator-list-tools #operatorNew {
    order: -1;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 13px;
    border-radius: 9px;
    white-space: nowrap;
    font-size: 11px;
  }

  #operators.active-view .operator-list-card > .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-gutter: stable;
  }

  #operators.active-view .operator-list-card > .table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 0 1px 0 var(--line);
  }
}

@media (max-width: 700px) {
  #operators.active-view .operator-list-card > .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  #operators.active-view .operator-list-tools {
    width: 100%;
  }

  #operators.active-view .operator-list-tools .searchbox {
    flex: 1 1 auto;
    width: auto;
  }
}
