.form-row { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.form-row.dragging { opacity: 0.7; transform: scale(0.98); box-shadow: 0 8px 20px rgba(163,213,255,0.25); }
.droppable { border: 1px dashed rgba(163,213,255,0.6); border-radius: 12px; background: rgba(163,213,255,0.08); }
body.dragging-form { cursor: grabbing !important; }
.fields-editor li.drag-source { opacity: 0.6; transform: scale(0.99); box-shadow: 0 10px 20px rgba(163,213,255,0.35); }
.fields-editor li.drag-target { border: 1px dashed rgba(163,213,255,0.8); background: rgba(163,213,255,0.1); border-radius: 10px; }
.fields-editor li.placeholder { height: 14px; border: 1px dashed rgba(163,213,255,0.45); margin: 6px 0; border-radius: 10px; background: rgba(163,213,255,0.06); transition: height 0.12s ease; }
.fields-editor li.placeholder.active { height: 32px; background: rgba(163,213,255,0.12); border-color: rgba(163,213,255,0.8); }
.placeholder-row { border: 1px dashed rgba(163,213,255,0.45); border-radius: 10px; background: rgba(163,213,255,0.05); transition: height 0.12s ease; }
.placeholder-row.active { background: rgba(163,213,255,0.12); border-color: rgba(163,213,255,0.8); }
.fields-edit-list li.dragging { opacity: 0.6; }
/* Right-aligned controls: Required, Desc, Delete */
.right-controls { display: flex; align-items: center; gap: 10px; }
.right-controls .req { display: flex; align-items: center; gap: 4px; }
:root {
  /* Dark mode with pastel sunrise accents */
  --bg-start: #0c0f1a;   /* deep navy */
  --bg-mid:   #171a2b;   /* dusk blue */
  --bg-end:   #241a2e;   /* plum */

  --panel: rgba(16, 19, 32, 0.78);
  --panel-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  --primary: #ffb3a7;    /* pastel coral */
  --accent:  #a3d5ff;    /* light sky */
  --danger:  #ff8a80;    /* soft red */

  --text:  #e8eaf6;
  --muted: #a9b3c3;
}

* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color: var(--text);
  color-scheme: dark; /* Hint browsers/OS for dark-native controls (select menus, etc.) */
}
header.header, header { display: flex; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid var(--panel-border); backdrop-filter: saturate(1.1) blur(4px); background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(0,0,0,0)); }
header h1 { margin: 0; font-size: 20px; }
.spacer { flex: 1; }

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.container.narrow { max-width: 560px; }
.container > .grid { margin-bottom: 16px; }

.card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-header h2 { margin: 0; }
.card-actions { display: flex; align-items: center; gap: 8px; }
.card-actions button { flex-shrink: 0; }
.card-search { display: flex; align-items: center; margin-left: auto; margin-right: 12px; }
.card-search input[type="search"] { padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.35); color: #fff; min-width: 220px; }
.card-search input[type="search"]::placeholder { color: rgba(255,255,255,0.55); }
.collapsible .card-header { margin-bottom: 8px; }
.collapsible-body.collapsed { display: none; }
.section-card { margin-top: 16px; }
.section-card .card-header h3 { margin: 0; font-size: 18px; }
.section-card .section-body { margin-top: 4px; }
.empty-sections { padding: 16px; text-align: center; font-size: 14px; }
.container > .card { margin-top: 16px; }
/* Vertical spacing between stacked cards at the top level */
.container > .card { margin-top: 16px; }
/* Remove sibling margin inside grids to keep top edges aligned */
.grid .card + .card { margin-top: 0; }

label { display: block; margin: 10px 0; }
/* Normalize headings inside cards for consistent top alignment */
h2, h3 { margin: 0 0 12px; line-height: 1.2; }
label > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input[type="date"], input[type="time"], input[type="datetime-local"], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: var(--text);
  box-shadow: none;
}
/* Prevent iOS Safari auto-zoom on focus by using >=16px font-size on small screens */
@media (max-width: 640px) {
  input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input[type="date"], input[type="time"], input[type="datetime-local"], textarea, select {
    font-size: 16px !important;
  }
}
/* Improve select dropdown legibility on dark background */
select { background-color: rgba(255,255,255,0.06); color: var(--text); }
select:focus { border-color: var(--accent); }
/* Option list styling (supported in most modern browsers) */
option { background-color: #121826; color: var(--text); }
option:checked { background-color: rgba(163,213,255,0.22); color: var(--text); }
optgroup { color: var(--text); }
textarea { min-height: 100px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(163, 213, 255, 0.15); }

.actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
#editor .actions { margin-bottom: 16px; }
button { background: var(--primary); color: #2a2a2a; border: none; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-weight: 700; transition: transform 0.06s ease, box-shadow 0.2s ease; box-shadow: 0 6px 14px rgba(255, 179, 167, 0.2); }
button:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(255, 179, 167, 0.35); }
button:active { transform: translateY(0); }
button.secondary { background: var(--accent); color: #0b1020; box-shadow: 0 6px 14px rgba(163, 213, 255, 0.18); }
button.secondary:hover { box-shadow: 0 10px 18px rgba(163, 213, 255, 0.3); }
button.danger { background: var(--danger); color: #0b1020; box-shadow: 0 6px 14px rgba(255, 138, 128, 0.2); }
button.small { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

@keyframes button-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

button.is-loading::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.65);
  border-top-color: rgba(255,255,255,0.2);
  animation: button-spin 0.8s linear infinite;
}

button.is-loading.small,
button.small.is-loading {
  padding-left: 26px;
}

.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.uploads-list::-webkit-scrollbar {
  width: 6px;
}

.uploads-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
}

.uploads-toolbar {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  align-items: center;
  padding: 0 0 10px 0;
}

.uploads-toolbar button {
  background: transparent;
  color: #e2eaff;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.uploads-toolbar button:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
}

.uploads-toolbar button.is-loading {
  background: rgba(255,255,255,0.12);
}

.uploads-zip-btn {
  min-width: 150px;
}

.uploads-item {
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(16, 28, 52, 0.78);
  box-shadow: 0 6px 18px rgba(10, 10, 18, 0.25);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.uploads-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(10, 10, 18, 0.35);
}

.uploads-name {
  font-weight: 600;
  color: #ecf5ff;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploads-meta {
  min-width: 70px;
  text-align: right;
  font-size: 12px;
  opacity: 0.8;
}

.uploads-download-btn {
  min-width: 96px;
}

/* Button color variants for visibility in Your Forms */
button.primary { background: #3b82f6; color: #0b1020; box-shadow: 0 6px 14px rgba(59, 130, 246, 0.25); }
button.primary:hover { background: #2563eb; }
button.success { background: #22c55e; color: #0b1020; box-shadow: 0 6px 14px rgba(34, 197, 94, 0.25); }
button.success:hover { background: #16a34a; }
button.warning { background: #f59e0b; color: #0b1020; box-shadow: 0 6px 14px rgba(245, 158, 11, 0.25); }
button.warning:hover { background: #d97706; }
button.info { background: #38bdf8; color: #0b1020; box-shadow: 0 6px 14px rgba(56, 189, 248, 0.25); }
button.info:hover { background: #0ea5e9; }
button.teal { background: #14b8a6; color: #0b1020; box-shadow: 0 6px 14px rgba(20, 184, 166, 0.25); }
button.teal:hover { background: #0d9488; }
button.purple { background: #a78bfa; color: #0b1020; box-shadow: 0 6px 14px rgba(167, 139, 250, 0.25); }
button.purple:hover { background: #8b5cf6; }

.list .item { display: flex; align-items: center; gap: 10px; padding: 12px 10px; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.item .title {
  font-weight: 600;
  flex: 1 1 auto;
  max-width: 50%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item .muted {
  font-size: 12px;
  white-space: nowrap;
}
.item .timestamp {
  margin-left: auto;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hidden { display: none; }
.muted { color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
#editor .grid { grid-template-columns: 1fr; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }

/* Top row (Create Form + Fields Bank) alignment */
.grid-top { align-items: stretch; }
.grid-top > .card { height: 100%; display: flex; flex-direction: column; }
.grid-top > .card .fields { flex: 1 1 auto; overflow: auto; }

ul.fields { list-style: none; padding: 0; margin: 0; }
ul.fields li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
ul.fields li[draggable="true"] { cursor: grab; }
/* Drag handle cursor */
.handle { cursor: grab; user-select: none; }
.handle:active { cursor: grabbing; }
ul.fields li.dragging { opacity: 0.6; }
/* Visual grouping for sections in admin editor */
ul.fields li.field-section { background: rgba(163, 213, 255, 0.06); border-left: 3px solid var(--accent); padding-left: 10px; border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
ul.fields li.field-section.active { background: rgba(163, 213, 255, 0.12); border-left-color: var(--primary); }
ul.fields li.in-section { margin-left: 12px; border-left: 2px dashed rgba(255,255,255,0.12); padding-left: 10px; }

/* Description rows under each field/section */
ul.fields li.desc-row {
  display: block;
  padding: 2px 0 6px; /* tighter */
  border-bottom: none; /* no separator around the description row */
}
/* Make sure hidden wins over desc-row display */
ul.fields li.desc-row.hidden { display: none !important; }
/* Inline section contents under header */
ul.fields li.section-contents-row {
  display: block;
  padding: 6px 0 10px;
  border-bottom: none;
}
ul.fields li.section-contents-row.hidden { display: none !important; }
/* Visual container for inline section list */
.section-inline { border: 1px dashed rgba(255,255,255,0.12); border-radius: 10px; padding: 8px 10px; background: rgba(255,255,255,0.03); }
/* Remove the dashed line under the item directly above a description row */
ul.fields li:has(+ li.desc-row) {
  border-bottom: none;
}
ul.fields li.desc-row > div { /* indent to align with content after the drag handle */
  margin-left: 28px;
}
ul.fields li.desc-row input[type="text"] {
  width: min(560px, 100%);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
  color: var(--text);
}
ul.fields li.desc-row input::placeholder { color: rgba(255,255,255,0.5); }

/* Tighten vertical rhythm between items */
ul.fields li + li.desc-row { margin-top: -10px; } /* pull closer to the field row */
ul.fields li.desc-row + li { margin-top: 2px; }

/* Top-level drop zone to promote fields out of sections */
.dropzone { padding: 6px 10px; margin: 4px 0; border: 1px dashed rgba(255,255,255,0.12); color: var(--muted); text-align: center; border-radius: 8px; font-size: 12px; background: rgba(255,255,255,0.03); }
.dropzone.hidden { display: none; }

/* Live drag placeholder for smooth spacing while dragging */
ul.fields li.placeholder {
  display: block;
  height: 12px; /* default, JS may override */
  margin: 4px 0;
  border-radius: 6px;
  background: rgba(163, 213, 255, 0.12);
  border: 1px dashed rgba(163,213,255,0.4);
  pointer-events: auto; /* allow direct drop */
  transition: height 120ms ease;
}

/* Right-side section detail panel */
#sectionDetail { min-height: 140px; border: 1px dashed rgba(255,255,255,0.12); border-radius: 10px; padding: 8px 10px; background: rgba(255,255,255,0.03); }

/* Public form: make field labels bolder and a touch larger */
#formContainer label > span {
  font-weight: 700;
  color: #ffffff;
  font-size: 14px;
}

/* Live form layout constraints */
#formContainer { max-width: 720px; margin: 0 auto; padding: 0 14px; }
.form-field { width: 100%; }
.form-field * { max-width: 100%; }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="number"],
.form-field input[type="url"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="datetime-local"],
.form-field input[type="file"],
.form-field textarea,
.form-field select { display: block; width: 100%; max-width: 100%; -webkit-appearance: none; appearance: none; }

/* Uniform control sizing (exclude checkbox/radio/file) */
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-field select {
  box-sizing: border-box;
  height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.2;
}
.form-field textarea {
  box-sizing: border-box;
  min-height: 110px;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.35;
}

/* iOS date/time pickers: keep height consistent */
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input[type="datetime-local"] {
  height: 44px;
}

/* Make labels and descriptions wrap nicely on narrow screens */
.form-field label > span, .form-field .muted { word-break: break-word; overflow-wrap: anywhere; }

/* Tighter vertical rhythm for controls inside field cards on small screens */
@media (max-width: 480px) {
  #formContainer { padding: 0 12px; }
  .form-field { margin: 20px 0 26px; padding: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.14); }
}

/* Bigger spacing between fields in the live form */
.form-field { margin: 22px 0 28px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 6px 16px rgba(0,0,0,0.18); transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.form-field:nth-child(even) { background: rgba(163,213,255,0.06); border-color: rgba(163,213,255,0.16); }
.form-field > label { margin: 0; }
.form-field .muted { margin: 2px 0 6px !important; font-size: 12px; color: var(--muted); }
/* Completed (done) state */
.form-field.done { border-color: rgba(34, 197, 94, 0.8); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25), 0 10px 18px rgba(0,0,0,0.25); background-color: rgba(34, 197, 94, 0.06); }
/* Live form: make descriptions noticeable in red */
#formContainer .form-field .muted { color: #ff6b6b !important; }

.copy { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight: 700; color: #ffffff; }
ul.fields .copy { font-size: 14px; }

/* In-app modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); padding: 16px; z-index: 1000; }
.modal:not(.hidden) { display: flex; align-items: center; justify-content: center; }
.modal .modal-dialog { width: 100%; max-width: 640px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; }
.modal .modal-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 12px 18px;
  padding-right: 64px;
  background: linear-gradient(135deg, rgba(17, 32, 58, 0.92) 0%, rgba(11, 19, 32, 0.82) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px 14px 0 0;
}
.modal .modal-header h3 { margin: 0; font-size: 20px; color: #f6fbff; letter-spacing: 0.2px; }
.modal .modal-header .actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.modal .modal-header .actions button {
  background: transparent;
  color: #d2e5ff;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
  border-radius: 999px;
  padding: 6px 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.modal .modal-header .actions button:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
}
.modal .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #ecf5ff;
  font-size: 20px;
  line-height: 1;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.12s ease;
}
.modal .modal-close:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.05);
}
.modal .modal-close:active {
  transform: scale(0.96);
}
.modal .modal-body {
  margin: 0;
  padding: 18px;
  max-height: 60vh;
  overflow: auto;
  background: linear-gradient(180deg, rgba(12, 21, 38, 0.95) 0%, rgba(9, 15, 28, 0.88) 100%);
}
.modal .modal-row { display: flex; align-items: center; padding: 8px 4px; border-bottom: 1px dashed rgba(255,255,255,0.06); }
.modal .modal-row:last-child { border-bottom: none; }

.modal-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 18px 18px;
  background: rgba(12, 21, 38, 0.9);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 0 14px 14px;
}
.modal-footer > *:first-child {
  margin-left: 0;
}

.modal-footer button {
  border-radius: 999px;
  padding: 8px 18px;
}

.modal-footer .muted {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.75;
}

/* Editor modal overrides */
.editor-modal .modal-dialog {
  max-width: 980px;
  width: 100%;
  background: rgba(16, 19, 32, 0.9);
}
.editor-modal .modal-body {
  max-height: 70vh;
  padding: 0;
}
.editor-body {
  padding: 12px;
}
.editor-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Live form: modern download button (file field) */
.dl-btn {
  position: relative;
  width: 152px;
  height: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center; /* center the label */
  border: 1px solid rgba(163,213,255,0.35);
  background: rgba(163,213,255,0.12);
  overflow: hidden;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}
.dl-btn, .dl-btn__icon, .dl-btn__text { transition: all 260ms ease; }
.dl-btn .dl-btn__text { color: #eaf4ff; font-weight: 700; width: 100%; text-align: center; padding: 0 50px 0 8px; }
.dl-btn .dl-btn__icon {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 44px;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}
.dl-btn .svg { width: 18px; fill: #0b1020; }
.dl-btn:hover { background: rgba(163,213,255,0.22); border-color: rgba(163,213,255,0.6); }
.dl-btn:hover .dl-btn__text { color: transparent; }
.dl-btn:hover .dl-btn__icon { width: 100%; right: 0; border-radius: 999px; }
.dl-btn:active .dl-btn__icon { filter: brightness(0.9); }
.dl-btn:active { transform: translateY(0.5px); }

/* Upload browse trigger styled like download button */
.upload-control { display: flex; flex-direction: column; gap: 10px; }
.upload-control .dl-btn.upload-btn {
  width: 152px;
  height: 40px;
  border-radius: 999px;
  justify-content: center;
  background: rgba(255,179,167,0.18);
  border: 1px solid rgba(255,179,167,0.45);
  box-shadow: 0 6px 14px rgba(255, 179, 167, 0.18);
}
.upload-control .dl-btn.upload-btn .dl-btn__text {
  padding: 0 78px 0 6px;
  color: #ffffff;
  font-size: 13px;
  white-space: nowrap;
}
.upload-control .dl-btn.upload-btn .dl-btn__icon {
  width: 44px;
  background-color: var(--primary);
}
.upload-control .dl-btn.upload-btn .svg { width: 20px; }
.upload-control .dl-btn.upload-btn.is-disabled,
.upload-control .dl-btn.upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.upload-control .dl-btn.upload-btn:hover {
  background: rgba(255,179,167,0.28);
  border-color: rgba(255,179,167,0.65);
  box-shadow: 0 10px 18px rgba(255, 179, 167, 0.32);
}
.upload-control .dl-btn.upload-btn:hover .dl-btn__text { color: transparent; }
.upload-control .dl-btn.upload-btn:hover .dl-btn__icon { width: 100%; right: 0; border-radius: 999px; }
.upload-control .dl-btn.upload-btn:active .dl-btn__icon { filter: brightness(0.9); }
.upload-control .hidden-file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; clip: rect(0, 0, 0, 0); overflow: hidden; }
.upload-control .upload-status { font-style: italic; }

/* Repeatable sections on client form */
.section-wrap { border: 1px dashed rgba(255,255,255,0.12); border-radius: 12px; padding: 12px; margin: 12px 0; background: rgba(255,255,255,0.03); }
.section-header { display: flex; align-items: center; gap: 8px; justify-content: space-between; border-bottom: 1px dashed rgba(255,255,255,0.08); padding-bottom: 6px; margin-bottom: 8px; }
.section-list { display: grid; gap: 12px; }
.section-instance { border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 10px; background: rgba(0,0,0,0.08); }
.section-add-btn { margin-top: 12px; }

/* Pagination controls */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.pagination-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.pagination-controls button:disabled:hover {
  transform: none;
  box-shadow: 0 6px 14px rgba(163, 213, 255, 0.18);
}
.pagination-controls #pageInfo {
  font-size: 13px;
  padding: 0 8px;
}
