/* Shared CRUD form refresh */

.container > h1:first-child,
#content > h1:first-child,
.content > h1:first-child,
.createProjectMain > h1:first-child {
  margin: 0 0 16px;
  padding: 18px 22px;
  border: 1px solid #dbe5f3;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(241,247,255,0.98)),
    radial-gradient(circle at top right, rgba(37,99,235,0.12), transparent 38%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  color: #10233f;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.form:not(.wide) {
  margin: 0 0 24px;
  padding: 22px 24px 24px;
  border: 1px solid #dbe5f3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.form:not(.wide):after {
  content: "";
  display: block;
  clear: both;
}

.form:not(.wide) .note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
  color: #475569;
  font-size: 13px;
}

.form:not(.wide) .required {
  color: #dc2626;
}

.form:not(.wide) .errorSummary {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff5f5;
  color: #991b1b;
}

.form:not(.wide) .errorSummary ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.form:not(.wide) .row {
  margin: 0 0 18px;
}

.form:not(.wide) .row:last-child {
  margin-bottom: 0;
}

.form:not(.wide) label {
  display: block;
  margin: 0 0 7px;
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.form:not(.wide) input[type="text"],
.form:not(.wide) input[type="password"],
.form:not(.wide) input[type="email"],
.form:not(.wide) input[type="number"],
.form:not(.wide) input[type="date"],
.form:not(.wide) input[type="file"],
.form:not(.wide) select,
.form:not(.wide) textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form:not(.wide) textarea {
  min-height: 110px;
  resize: vertical;
}

.form:not(.wide) input[type="text"]:focus,
.form:not(.wide) input[type="password"]:focus,
.form:not(.wide) input[type="email"]:focus,
.form:not(.wide) input[type="number"]:focus,
.form:not(.wide) input[type="date"]:focus,
.form:not(.wide) input[type="file"]:focus,
.form:not(.wide) select:focus,
.form:not(.wide) textarea:focus {
  border-color: #60a5fa;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.form:not(.wide) input[type="checkbox"],
.form:not(.wide) input[type="radio"] {
  margin-right: 6px;
}

.form:not(.wide) .checkbox-inline,
.form:not(.wide) .radio-inline {
  display: inline-flex;
  align-items: center;
  margin-right: 14px;
  font-weight: 500;
}

.form:not(.wide) .hint,
.form:not(.wide) .errorMessage {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}

.form:not(.wide) .hint {
  color: #64748b;
}

.form:not(.wide) .errorMessage {
  color: #dc2626;
  font-weight: 600;
}

.form:not(.wide) .buttons,
.form:not(.wide) .row.buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.form:not(.wide) .buttons input[type="submit"],
.form:not(.wide) .buttons button,
.form:not(.wide) .buttons .btn,
.form:not(.wide) .row.buttons input[type="submit"],
.form:not(.wide) .row.buttons button,
.form:not(.wide) .row.buttons .btn {
  min-width: 140px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #1d4ed8;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.form:not(.wide) .buttons input[type="submit"]:hover,
.form:not(.wide) .buttons button:hover,
.form:not(.wide) .buttons .btn:hover,
.form:not(.wide) .row.buttons input[type="submit"]:hover,
.form:not(.wide) .row.buttons button:hover,
.form:not(.wide) .row.buttons .btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: #fff;
  transform: translateY(-1px);
}

.form:not(.wide) table {
  width: 100%;
}

@media (max-width: 767px) {
  .container > h1:first-child,
  #content > h1:first-child,
  .content > h1:first-child,
  .createProjectMain > h1:first-child {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 24px;
  }

  .form:not(.wide) {
    padding: 16px;
    border-radius: 12px;
  }

  .form:not(.wide) .buttons,
  .form:not(.wide) .row.buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .form:not(.wide) .buttons input[type="submit"],
  .form:not(.wide) .buttons button,
  .form:not(.wide) .buttons .btn,
  .form:not(.wide) .row.buttons input[type="submit"],
  .form:not(.wide) .row.buttons button,
  .form:not(.wide) .row.buttons .btn {
    width: 100%;
  }
}
