* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  min-height: 100vh;
  padding: 40px 20px;
  -webkit-font-smoothing: antialiased;
}

.card {
  max-width: 580px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 28px;
  overflow-wrap: anywhere;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  color: #1a202c;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.form-input,
.form-select {
  height: 46px;
}

  .form-input:hover,
  .form-select:hover,
  .form-textarea:hover {
    border-color: #cbd5e1;
  }

  .form-input:focus,
  .form-select:focus,
  .form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  }

  .form-input::placeholder,
  .form-textarea::placeholder {
    color: #94a3b8;
  }

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Three column row */
.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  --margin-bottom: 20px;
}
/* Two column row */
.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  --margin-bottom: 20px;
}

.row-2-with-checkbox {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  --margin-bottom: 20px;
}
/* Controller field with inline checkbox */
.controller-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.controller-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

  .controller-row .form-select {
    flex: 1;
    min-width: 0;
  }
/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.checkbox-custom {
  position: relative;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

  .checkbox-custom input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
  }

  .checkbox-custom .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 5px;
    transition: all 0.2s ease;
  }

  .checkbox-custom input:hover ~ .checkmark {
    border-color: #cbd5e1;
  }

  .checkbox-custom input:checked ~ .checkmark {
    background: #6366f1;
    border-color: #6366f1;
  }

  .checkbox-custom .checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 5.5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  .checkbox-custom input:checked ~ .checkmark:after {
    display: block;
  }

.checkbox-label {
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
/* Priority select with dot */
.priority-wrapper {
  position: relative;
}

.priority-dot {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  transition: background 0.2s;
}

  .priority-dot.high {
    background: #ef4444;
  }

  .priority-dot.medium {
    background: #f59e0b;
  }

  .priority-dot.low {
    background: #22c55e;
  }

.priority-wrapper .form-select {
  padding-left: 32px;
}
/* Payment section */
.payment-section {
  background: #f8fafc;
  border-radius: 16px;
  padding: 20px;
  --margin-top: 24px;
  border: 1px solid #e2e8f0;
}

  .payment-section .form-label {
    color: #64748b;
  }

.wallet-select {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

  .wallet-select:hover {
    border-color: #cbd5e1;
  }

.wallet-icon {
  color: #f59e0b;
}

.wallet-info {
  flex: 1;
  font-size: 14px;
  color: #1a202c;
}

.wallet-arrow {
  color: #94a3b8;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.input-with-suffix {
  position: relative;
}

  .input-with-suffix .form-input {
    padding-right: 36px;
  }

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.safe-deal-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 0px;
  font-size: 12px;
  color: #64748b;
  line-height: normal;
}

  .safe-deal-note svg {
    color: #f59e0b;
    flex-shrink: 0;
  }
/* Buttons */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: #006cb4;
  color: #ffffff;
}

  .btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0, 108, 180, 0.4);
  }

.btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #e2e8f0;
}

  .btn-secondary:hover {
    background: #f8fafc;
    color: #1a202c;
  }

.btn-change {
  background: #ff9800ba;
  color: #ffffff;
}

  .btn-change:hover {
    box-shadow: 0 4px 12px rgba(0, 108, 180, 0.4);
  }

/* Deadline fields for different regularity types */
.deadline-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.deadline-fields {
  display: none;
}

  .deadline-fields.active {
    display: block;
  }
/* Responsive */
@media (max-width: 560px) {
  .row-3 {
    grid-template-columns: 1fr;
  }

  .row-2,
  .row-2-with-checkbox,
  .payment-row {
    grid-template-columns: 1fr;
  }

  .controller-row {
    flex-wrap: wrap;
  }
}

.wallet-select a {
  color: #006cb4;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

  .wallet-select a:hover {
    color: #006cb4;
    text-decoration: underline;
  }
.wallet-links {
  display: flex;
  gap: 12px;
}

@media (max-width: 560px) {
  .wallet-select {
    flex-wrap: wrap;
  }

  .wallet-links {
    width: 100%;
    margin-top: 8px;
    justify-content: center;
  }
}


.profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 36px;
  border: 1px solid #ededed;
  border-radius: 12px;
  text-decoration: none;
  max-width: 641px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 6px 10px;
  color: #000 !Important;
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
  .profile-link:hover {
    background-color: #f6f6f6 !important;
    border-color: #ddd
  }


input[type=button].edit {
  width: 24px;
  height: 24px;
  background-image: url("../img/pen.svg");
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: center;
  background-color: #000000;
  cursor: pointer;
  border: none;
  filter: invert(1);
  --opacity: 0.5;
}
  input[type=button].edit:hover {
    --opacity: 0.8; /* При наведении становится ярче */
    animation: shake 0.3s;
  }
input[type=button].save {
  width: 24px;
  height: 24px;
  background-image: url("../img/save.svg");
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: center;
  background-color: #000000;
  cursor: pointer;
  border: none;
  filter: invert(1);
  --opacity: 0.5;
}
  input[type=button].save:hover {
    --opacity: 0.8; /* При наведении становится ярче */
    animation: shake 0.3s;
  }

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-2px);
  }

  40% {
    transform: translateX(2px);
  }

  60% {
    transform: translateX(-2px);
  }

  80% {
    transform: translateX(2px);
  }

  100% {
    transform: translateX(0);
  }
}
/* Контейнер, чтобы они шли в ряд */
.observers-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

