/* Form surfaces and controls are scoped to editors, never list actions or search. */
.form-page { max-width: 1100px; margin-inline: auto; }
.form-page--compact { max-width: 790px; }
.form-back { display: inline-block; margin-bottom: 22px; padding-block: 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.form-back:hover { color: var(--accent); }
.studio-form { display: grid; gap: 24px; }
.creator-app .form-section,
.creator-app .settings-panel {
  min-width: 0;
  border: 1px solid #d9e1e7;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 4px 6px #23364303, 0 16px 36px -24px #33465438;
  overflow: hidden;
}
.form-section-heading { display: flex; align-items: flex-start; gap: 16px; padding: 26px 30px; background: linear-gradient(115deg, #ebf4fa, #f6f9fb 60%, #fff); }
.form-section-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #fff; border-radius: 14px; color: #547c99; background: #ddeaf4; box-shadow: 0 2px 4px #324d600a; }
.form-section-icon .ui-icon { width: 21px; height: 21px; }
.form-section-intro { min-width: 0; }
.creator-app .form-section-heading h2 { font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -.45px; color: #303940; }
.form-section-heading p { margin-top: 6px; max-width: 46ch; color: #67747d; font-size: 12px; line-height: 1.65; }
.form-section-number { display: block; margin-bottom: 8px; color: #648399; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; }
.form-section-body { min-width: 0; padding: 30px; }
.form-section-body > * + * { margin-top: 24px; }
.form-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-field, .studio-form .grid > div { min-width: 0; }
.form-field :is(input, select, textarea) { margin-top: 9px; width: 100%; }
.creator-app :is(.studio-form, .studio-fields) :is(label:not(:has(input)), legend) { color: #465057; font-size: 12px; line-height: 1.5; font-weight: 600; }
.creator-app :is(.studio-form, .studio-fields) :is(input, textarea, select):where(:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button])) {
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  border: 1px solid #d0d8de;
  border-radius: 11px;
  background-color: #f6f8fa;
  color: #2d363c;
  padding-block: 12px;
  padding-inline: 14px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px #2e425104;
  transition: background-color .16s, border-color .16s, box-shadow .16s;
}
.creator-app :is(.studio-form, .studio-fields) select { padding-right: 40px; text-overflow: ellipsis; }
.creator-app :is(.studio-form, .studio-fields) textarea { resize: vertical; min-height: 106px; }
.creator-app :is(.studio-form, .studio-fields) :is(input, textarea)::placeholder { color: #626f79; opacity: 1; }
.creator-app :is(.studio-form, .studio-fields) :is(input, textarea, select):not(:disabled):hover { border-color: #a2b7c6; }
.creator-app :is(.studio-form, .studio-fields) :is(input, textarea, select):where(:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button])):focus {
  background-color: white;
  border-color: var(--accent-ring);
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #e6f0f7;
}
.creator-app :is(.studio-form, .studio-fields) :is(input, textarea, select):disabled { color: #737e85; background-color: #ebeef1; cursor: not-allowed; opacity: .75; }
.creator-app :is(.studio-form, .studio-fields) :is(input, textarea, select)[readonly] { background-color: #edf0f3; color: #6a757d; }
.creator-app :is(.studio-form, .studio-fields) :is(.field_with_errors input, .field_with_errors textarea, .field_with_errors select, [aria-invalid=true], :user-invalid) { border-color: #bc5565; background-color: #fff6f6; }
.creator-app :is(.studio-form, .studio-fields) :is(input[type=checkbox], input[type=radio]) { accent-color: var(--accent); flex-shrink: 0; width: 17px; height: 17px; }
.creator-app .studio-form .field-hint,
.creator-app .studio-form :is(.text-xs.text-gray-400, .text-xs.text-gray-500) { margin-top: 7px; color: #65727b; font-size: 11px; line-height: 1.6; }
.creator-app .form-field--title input { font-size: 17px; font-weight: 500; padding-block: 15px; min-height: 56px; background-color: #f8fafc; }
.creator-app .studio-form .form-money-input { color: var(--money); padding-left: 32px; font-variant-numeric: tabular-nums; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px 30px; border-top: 1px solid #e8eef2; background: #f9fbfd; }
.studio-form > .form-actions { border: 1px solid #d9e1e7; border-radius: 16px; }
.creator-app .form-submit,
.creator-app .studio-fields :is(input, button)[class~=bg-indigo-600] { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 24px; border: 1px solid #4880a8; border-radius: 11px; background: var(--accent); color: white; font-size: 13px; line-height: 1.5; font-weight: 600; box-shadow: inset 0 1px #ffffff26, 0 3px 7px #31618324; transition: background-color .16s, box-shadow .16s; cursor: pointer; }
.creator-app .form-submit:hover,
.creator-app .studio-fields :is(input, button)[class~=bg-indigo-600]:not(:disabled):hover { background: var(--accent-hover); box-shadow: inset 0 1px #ffffff26, 0 4px 10px #31618330; }
.creator-app .form-submit:disabled { cursor: not-allowed; opacity: .5; }
.form-cancel { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 17px; border-radius: 10px; color: #66757f; font-size: 13px; font-weight: 500; }
.form-cancel:hover { color: #344551; background: #eaf0f5; }
.form-errors { padding: 18px 22px; border: 1px solid #eac5cb; border-radius: 15px; background: #fff5f5; color: #9c3549; font-size: 13px; }
.form-errors p { font-weight: 600; }
.form-errors ul { margin-top: 6px; padding-left: 18px; list-style: disc; }
.studio-form .contact-fields { padding: 26px 30px; }
.studio-form .contact-fields + .contact-fields { border-top: 1px dashed #d4dee5; }
.studio-form .nested-form-row { background: #f8fafc; border: 1px solid #dde5eb; border-radius: 15px; padding: 20px; }
.creator-app .studio-form .nested-form-row label { font-size: 11px; text-transform: none; letter-spacing: 0; }
.studio-form .deliverable-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.studio-form .deliverable-meta > :is(:nth-child(1), :nth-child(4), :nth-child(5)) { grid-column: span 2; }
.form-section--deliverables > .form-section-heading { align-items: center; justify-content: space-between; }
.form-section--deliverables > .form-section-heading > .form-section-heading { padding: 0; background: none; }
.studio-form .form-options { border: 1px solid #dfe7ed; border-radius: 14px; background: #f8fafc; padding: 18px; }
.creator-app .studio-form .form-options label { padding-block: 6px; }
.settings-sections { max-width: 1040px; }
.creator-app .settings-panel > .form-section-heading { border: 0; }
.settings-panel .form-section-heading p { max-width: 80ch; }
.creator-app .settings-panel > :nth-child(2) { padding: 28px 30px; }
.studio-fields details { border-color: #d7e3eb; border-radius: 14px; padding: 20px; background-color: #f7fbfd; }
.studio-fields details[open] { background-color: #fff; }
.studio-fields .settings-choice { padding: 18px; border: 1px solid #dbe3e9; border-radius: 14px; background: #f8fafc; }
.studio-fields .settings-choice:has(input:checked) { border-color: #b4cee1; background: #eff6fb; }
.studio-fields .settings-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.creator-app .reply-editor { border-radius: 18px; border-color: #c8dbe9; background-color: #f4f9fc; }
.creator-app .reply-editor > :first-child { background: #eaf3fa; border-color: #d7e3ec; }
/* Reply composition needs more writing room than the compact notes fields. */
.creator-app .reply-editor textarea[data-email-reply-target~="body"] { min-height: 240px; }

/* Give the todo collection the same soft surface as its editor. */
.todo-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.todo-tabs { display: flex; padding: 5px; gap: 3px; border: 1px solid #dce4e9; border-radius: 12px; background: #e9eef2; max-width: 100%; overflow-x: auto; }
.todo-tabs a { padding: 9px 14px; border-radius: 8px; color: #6f7c85; font-size: 12px; font-weight: 500; white-space: nowrap; }
.todo-tabs a[aria-current=page] { background: white; color: #416985; box-shadow: 0 2px 5px #30455411; }
.todo-tabs a:hover { color: var(--accent); }
.todo-search { flex: 1; max-width: 320px; min-width: 210px; }
.creator-app .todo-search input { min-height: 44px; border: 1px solid #d5dee5; border-radius: 12px; background-color: #edf2f6; box-shadow: none; }
.creator-app .todo-board { border: 1px solid #d8e1e8; border-radius: 20px; box-shadow: 0 14px 30px -24px #344a5942; }
.todo-board-toolbar { background: #f0f6fa; border-color: #e1eaf1; min-height: 49px; }
.todo-board li { transition: background-color .15s; }
.todo-board li:hover { background: #fafcfd; }
.todo-board input[type=checkbox] { accent-color: var(--accent); }
.creator-app .todo-complete { min-height: 34px; border-radius: 9px; color: #557084; background: #eaf3fa; box-shadow: none; }
.creator-app .todo-complete:hover { color: #427257; background: #eaf5ed; }

@media (min-width: 1200px) {
  .studio-form--wide .form-section { display: grid; grid-template-columns: 225px minmax(0, 1fr); }
  .studio-form--wide .form-section > .form-section-heading { display: block; padding: 30px 25px; background: linear-gradient(140deg, #eaf3f9, #fafcfd 80%); border-right: 1px solid #e7eef3; }
  .studio-form--wide .form-section-icon { margin-bottom: 24px; }
  .studio-form--wide .form-section-heading h2 { font-size: 20px; }
  .studio-form--wide .form-section--deliverables > .form-section-heading > .form-section-heading { display: block; }
  .studio-form--wide .form-section--deliverables > .form-section-heading > button { margin-top: 20px; }
}
@media (max-width: 767px) {
  .form-back { margin-bottom: 16px; }
  .studio-form { gap: 20px; }
  .creator-app .form-section, .creator-app .settings-panel { border-radius: 18px; }
  .form-section-heading { padding: 22px; gap: 13px; }
  .creator-app .form-section-heading h2 { font-size: 17px; }
  .form-section-icon { width: 38px; height: 38px; border-radius: 12px; }
  .form-section-body, .studio-form .contact-fields, .creator-app .settings-panel > :nth-child(2) { padding: 22px; }
  .form-section-body > * + * { margin-top: 22px; }
  .form-actions { padding: 18px 22px; }
  .creator-app :is(.studio-form, .studio-fields) :is(input, textarea, select):where(:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button])) { font-size: 16px; }
  .todo-toolbar { gap: 14px; }
  .todo-search { flex-basis: 100%; max-width: none; }
  .todo-tabs { width: 100%; }
  .todo-tabs a { flex: 1; text-align: center; }
}
@media (max-width: 479px) {
  .form-field-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-form .deliverable-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-form .deliverable-meta > :is(:nth-child(1), :nth-child(4), :nth-child(5)) { grid-column: 1 / -1; }
  .studio-form .nested-form-row { padding: 16px; }
  .studio-form .deliverable-description { flex-wrap: wrap; }
  .studio-form .deliverable-description > :first-child { flex-basis: 100%; }
  .form-section-heading { padding: 20px 18px; }
  .form-section-body, .studio-form .contact-fields, .creator-app .settings-panel > :nth-child(2) { padding: 22px 18px; }
  .form-section--deliverables > .form-section-heading { flex-wrap: wrap; }
  .form-actions { padding: 16px 18px; }
  .form-section-icon { width: 34px; height: 34px; }
  .todo-tabs a { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-form *, .studio-fields *, .todo-board li { transition: none; }
}
