.add-record-page {
  padding: 72px 0 0px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Header над формою додавання запису --- */
.add-record-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  z-index: 25;
  padding: 8px 16px;
  height: 48px;
  box-sizing: border-box;

}
.add-record-title {
  font-size: 14px;
  font-weight: 700;
  color: #181818;
  text-align: center;
  flex: 1;
  transition: opacity 180ms ease;
}

.add-record-title--hidden {
  opacity: 0;
}
.add-record-back {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111827;
  font-weight: 700;
  font-size: 14px;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.add-record-cancel {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding:0px;
  color: #1b1b1b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}
.add-record-cancel:hover {
  color: #1b1b1b;
}

.add-record-header--hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- Дизайн форми додавання запису (мобільна версія) --- */
.add-record-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 16px calc(16px + var(--nav-height) + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 24px 24px  0px 0px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  margin: 0 auto;
  width: 100%;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: visible;
  width: 100%;
}

.add-record-label {
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 6px;
  color: #1b1b1b;
  text-align: left;
 
}

.add-record-field,
.add-client-field {
  display: flex;
  align-items: center;
  border-radius: 16px;
  min-height: 48px;
  font-size: 16px;
  transition: border 0.2s;
  gap: 10px;
  
}
.add-record-field:focus-within,
.add-client-field:focus-within {
  border-color: #a5b4fc;
}

.add-record-field input,
.add-record-field select,
.add-record-field textarea,
.add-client-field input,
.add-client-field select,
.add-client-field textarea {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px !important; /* 16px to avoid mobile zoom */
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  flex: 1;
  padding: 10px 0;
  height: 48px;
}

.add-record-field select,
.add-client-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
}

.add-record-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  height: 48px;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.add-record-field textarea {
  min-height: 38px;
  resize: vertical;
}

.add-record-icon {
  width: 16px;
  height: 16px;
  opacity: 0.9;
  flex-shrink: 0;
  display: block;
}

.add-record-field--icon {
  position: relative;
}

.add-record-field--icon > .add-record-icon {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 8px;
  border-radius: 50%;
  box-sizing: content-box;
}

.add-record-page .add-record-field--icon input,
.add-record-page .add-record-field--icon select,
.add-record-page .add-record-field--icon textarea,
.add-record-page .add-record-field--icon .add-record-input {
  padding-left: 40px;
}

.add-record-page .add-record-field {
  min-height: 40px;
  border-radius: 20px;
}

.add-record-page .add-record-field input,
.add-record-page .add-record-field select,
.add-record-page .add-record-field textarea,
.add-record-page .add-record-input {
  height: 46px;
}


.add-record-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.add-record-row--time {
  display: block;
}

.add-record-time-group {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.add-record-time-group .add-record-field {
  width: 100%;
}

.add-record-mid-label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  padding: 0 6px;
  white-space: nowrap;
}

.add-record-btn {
  width: 100%;
  background: #181818;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  padding: 0 18px;
  height: 48px;
  min-height: 48px;
  line-height: 48px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: background 0.2s;
}
.add-record-btn:active {
  background: #222;
}

/* Кастомна стрілка для select/inputs */
.add-record-field.add-record-field--select {
  position: relative;
}
.add-record-field.add-record-field--select::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  background: url("../images/icons/arrow_down.svg") center/contain no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}
.add-record-field.add-record-field--select select,
.add-record-field.add-record-field--select .add-record-input {
  padding-right: 36px;
}

.add-record-field.add-record-field--status {
  position: relative;
}

.add-record-field.add-record-field--status .add-record-status-dot {
  position: absolute;
  left: 40px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
}

.add-record-field.add-record-field--status[data-status="done"] .add-record-status-dot {
  background: #22c55e;
}

.add-record-field.add-record-field--status select,
.add-record-field.add-record-field--status .add-record-input {
  padding-left: 56px;
}

.add-record-field.add-record-field--date {
  position: relative;
}
.add-record-field.add-record-field--date input {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}
.add-record-field.add-record-field--date::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  background: url("../images/icons/arrow_down.svg") center/contain no-repeat;
  transform: translateY(-50%);
  pointer-events: none;
}
.add-record-field.add-record-field--date input::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
}
.add-record-field.add-record-field--date input::-ms-clear,
.add-record-field.add-record-field--date input::-ms-reveal {
  display: none;
}

.add-record-field.add-record-field--time {
  position: relative;
}
.add-record-field.add-record-field--time input[type="time"] {
  cursor: pointer;
  padding-right: 36px;
}
.add-record-field.add-record-field--time input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: none;
}
.add-record-field.add-record-field--time input[type="time"]::-ms-clear,
.add-record-field.add-record-field--time input[type="time"]::-ms-reveal {
  display: none;
}

/* Адаптація для дуже малих екранів */
@media (max-width: 300px) {
  .add-record-form {
    padding: 10px 2px 24px 2px;
  }
  .add-record-btn {
    font-size: 16px;
    padding: 12px 0;
  }
}
