/* modal.css
 * Вікна (модальні) + форми всередині
 */

.modal-layer {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, 0.72);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 60px 24px 100px;
  z-index: 100;
}
.modal-layer.hidden {
  display: none;
}

.modal {
  width: 100%;
  max-width: 860px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px clamp(24px, 3vw, 50px) 46px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  animation: pop 0.45s cubic-bezier(0.21, 1.02, 0.73, 1);
}
.modal.compact {
  max-width: 360px;
  padding: 26px 26px 30px;
  gap: 18px;
  border-radius: 18px;
}
.modal.compact h3 {
  font-size: 1rem;
}
.modal.compact footer {
  justify-content: stretch;
}
.modal.compact footer button {
  flex: 1 1 auto;
}
/* Neutral buttons inside official salary modal */
.off-salary-modal footer button.neutral {
  background: var(--panel-alt);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.off-salary-modal footer button.neutral:hover {
  background: var(--bg-alt);
  transform: none;
}
.off-salary-modal footer {
  flex-direction: column;
  align-items: stretch;
}
.off-salary-modal footer button {
  width: 100%;
  justify-content: center;
}
.off-salary-modal footer button.primary-action {
  font-weight: 600;
}
.off-salary-modal footer button.close-action {
  margin-top: 4px;
  opacity: 0.8;
}
.emp-checklist {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--bg-alt);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  font-size: 0.7rem;
}
.emp-check-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.emp-check-item:hover {
  background: rgba(60, 180, 120, 0.12);
}
.emp-check-item input {
  margin-top: 2px;
}
.modal h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.6px;
}
.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 16px 18px;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
}
textarea.short {
  min-height: 160px;
}

label span {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.inline-fields {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.inline-fields > * {
  flex: 1 1 220px;
}
.input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input input,
.input select {
  padding: 14px 16px;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.8rem;
}
.helper {
  font-size: 0.65rem;
  color: var(--text-dim);
  line-height: 1.3;
}

.modal footer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.modal footer button {
  font-size: 0.75rem;
}

@keyframes pop {
  0% {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
