:root {
  --orange: #ff6b00;
  --orange-hover: #e85f00;
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --bg-input: #0f0f0f;
  --sidebar: #0d0d0d;
  --text: #ffffff;
  --text-muted: #8a8a8a;
  --text-dim: #5a5a5a;
  --border: #222222;
  --border-light: #2a2a2a;
  --navy: #ffffff;
  --font: 'Inter', system-ui, sans-serif;
  --success-bg: rgba(34, 197, 94, 0.12);
  --success-text: #4ade80;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-text: #f87171;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.admin-body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  color-scheme: dark;
}

.admin-sidebar {
  width: 220px;
  background: var(--sidebar);
  color: var(--text);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  border-right: 1px solid var(--border);
}

.admin-sidebar__brand img {
  margin-bottom: 24px;
  height: 28px;
  width: auto;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.admin-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.admin-nav a:hover {
  background: rgba(255, 107, 0, 0.1);
  color: var(--text);
}

.admin-sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.admin-sidebar__foot a {
  color: var(--text-muted);
  text-decoration: none;
}
.admin-sidebar__foot a:hover { color: var(--orange); }

.admin-main {
  margin-left: 220px;
  flex: 1;
  padding: 24px 32px 80px;
  max-width: 1040px;
}

.admin-body--wide .admin-main {
  max-width: min(1360px, calc(100vw - 220px - 48px));
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.admin-topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.admin-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}
.admin-alert--ok { background: var(--success-bg); color: var(--success-text); border: 1px solid rgba(74, 222, 128, 0.25); }
.admin-alert--err { background: var(--error-bg); color: var(--error-text); border: 1px solid rgba(248, 113, 113, 0.25); }

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.admin-section h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field--full { grid-column: 1 / -1; }

.admin-field--check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.admin-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,107,44,0.15);
}

.admin-field small {
  font-size: 11px;
  color: var(--text-dim);
}

.admin-field--highlight {
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 8px;
  padding: 16px;
}

.admin-field__path {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
  word-break: break-all;
}

.admin-preview {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px;
  background: var(--bg-elevated);
}

.admin-preview--wide {
  max-width: 280px;
  max-height: 160px;
}

.admin-repeater {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

.admin-repeater__item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-section__hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: -8px 0 16px;
}

.admin-section__hint,
.admin-subheading {
  color: var(--text-muted);
}

.admin-section__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.admin-section__head-row h2 {
  margin: 0;
}

.admin-subheading {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.admin-repeater__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.admin-repeater__title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.admin-repeater__remove {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--error-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-repeater__remove:hover {
  color: #fca5a5;
}

.admin-repeater__actions {
  margin-top: 4px;
}

.admin-repeater__item--testimonial .admin-field--full,
.admin-repeater__item--testimonial .admin-repeater__toolbar {
  grid-column: 1 / -1;
}

.admin-repeater__item--stat .admin-field--full,
.admin-repeater__item--service .admin-field--full,
.admin-repeater__item--service .admin-repeater__toolbar {
  grid-column: 1 / -1;
}

/* ===== Portfolio manager ===== */
.admin-section--portfolio {
  padding: 0;
  overflow: hidden;
}

.admin-section--portfolio .pf-section-head {
  padding: 24px 28px 0;
}

.admin-section--portfolio .pf-section-head h2 {
  margin-bottom: 4px;
  padding-bottom: 0;
  border: none;
}

.pf-section-head__sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pf-section-settings {
  padding: 20px 28px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.pf-manager {
  background: var(--bg);
  padding: 28px;
}

.pf-manager__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.pf-manager__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.pf-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Single portfolio card */
.pf-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.pf-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--orange);
}

.pf-card__index {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
  background: var(--bg-card);
  border: 2px solid rgba(255, 107, 0, 0.35);
  border-radius: 10px;
}

.pf-card__heading {
  flex: 1;
  min-width: 0;
}

.pf-card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-card__meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pf-card__delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--error-text);
  background: var(--bg-card);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.pf-card__delete:hover {
  background: var(--error-bg);
  border-color: var(--error-text);
}

.pf-card__delete:active {
  transform: scale(0.98);
}

.pf-card__body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding: 24px;
  align-items: start;
}

.pf-card__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pf-row {
  display: grid;
  gap: 16px;
}

.pf-row--2 {
  grid-template-columns: 1fr 1fr;
}

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-field--full {
  grid-column: 1 / -1;
}

.pf-field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.pf-input {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-input::placeholder {
  color: var(--text-dim);
}

.pf-input:hover {
  border-color: var(--border-light);
}

.pf-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 44, 0.12);
}

.pf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pf-input-wrap__icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.7;
}

.pf-input--with-icon {
  padding-left: 42px;
}

.pf-card__upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 20px;
  border: 2px dashed var(--border-light);
  border-radius: 14px;
  background: var(--bg-elevated);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.pf-dropzone:hover {
  border-color: var(--orange);
  background: rgba(255, 107, 0, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 0, 0.15);
}

.pf-dropzone--has-image {
  padding: 8px;
  border-style: solid;
  border-color: var(--border);
  background: var(--bg-input);
}

.pf-dropzone--has-image:hover {
  border-color: var(--orange);
}

.pf-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.pf-dropzone__preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.pf-dropzone__preview--empty {
  display: none;
}

.pf-dropzone__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  padding: 8px;
}

.pf-dropzone__empty strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.pf-dropzone__empty span:last-child {
  font-size: 12px;
  color: var(--text-muted);
}

.pf-dropzone__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.pf-dropzone:hover .pf-dropzone__icon {
  color: var(--orange);
  border-color: rgba(255, 107, 44, 0.35);
}

.pf-dropzone__filename {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  word-break: break-all;
}

.pf-dropzone__filename:empty {
  display: none;
}

@media (max-width: 900px) {
  .pf-card__body {
    grid-template-columns: 1fr;
  }

  .pf-row--2 {
    grid-template-columns: 1fr;
  }

  .pf-manager {
    padding: 16px;
  }
}

.admin-repeater__item label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-repeater__item label span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-repeater__item input:not([type="file"]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.admin-repeater__item textarea,
.admin-repeater__item select {
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-repeater__item input::placeholder,
.admin-repeater__item textarea::placeholder {
  color: var(--text-dim);
}

.admin-repeater__item input:focus,
.admin-repeater__item textarea:focus,
.admin-repeater__item select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.admin-form__actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(transparent, var(--bg) 20%);
  padding-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn--primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn--primary:hover {
  background: var(--orange-hover);
  border-color: var(--orange-hover);
}

.btn--outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text);
}
.btn--outline:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--lg { padding: 14px 28px; font-size: 15px; }

/* Login */
body.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.login-card__logo {
  align-self: center;
  height: 32px;
  width: auto;
}

.login-card h1 {
  font-size: 1.25rem;
  text-align: center;
  color: var(--text);
}

.login-card__sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: -8px;
}

.login-card__error {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.login-card input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  background: var(--bg-input);
  color: var(--text);
}

.login-card__back {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.login-card__back:hover { color: var(--orange); }

/* ——— Footer CMS ——— */
.ft-admin {
  padding: 24px;
}

.ft-admin h2 {
  margin-bottom: 0;
  padding-bottom: 0;
  border: none;
}

.ft-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ft-header__sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.ft-header__sub a {
  color: var(--orange);
}

.ft-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.ft-panel__title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--navy);
}

.ft-links {
  margin-bottom: 10px;
}

.ft-links .cf-options__row {
  grid-template-columns: 1fr 1.2fr 40px;
}

/* ——— Contactpagina CMS ——— */
.cf-admin {
  padding: 0;
  border: none;
  background: transparent;
  margin-bottom: 32px;
  --cf-accent: var(--orange);
}

.cf-admin::before {
  content: '';
  display: block;
  height: 4px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--orange), #ffb347);
  margin-bottom: 0;
}

.cf-admin .cf-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.cf-admin .cf-header h2 {
  font-size: 1.25rem;
  margin: 0 0 4px;
  padding: 0;
  border: none;
}

.cf-header__sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.cf-header__preview {
  flex-shrink: 0;
}

.cf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 24px;
  align-items: start;
}

.cf-layout__side {
  min-width: 0;
}

.cf-layout__side .admin-grid {
  grid-template-columns: 1fr;
}

.cf-layout__side .admin-field input,
.cf-layout__side .admin-field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.cf-panel--compact {
  overflow: visible;
}

.cf-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-left: 3px solid transparent;
}

.cf-panel:hover {
  border-left-color: rgba(255, 107, 44, 0.35);
}

.cf-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.cf-panel__head h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0;
}

.cf-panel__badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.cf-panel__body {
  padding: 20px;
}

.cf-panel__body--flush {
  padding: 0;
}

.cf-panel--compact .cf-panel__body {
  padding: 16px;
}

.cf-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.cf-mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin: 0;
}

.cf-tip {
  margin: 12px 20px 16px;
  padding: 10px 14px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-radius: 8px;
  border-left: 3px solid var(--orange);
}

.cf-tip--sm {
  margin: 0 0 12px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.cf-check-inline {
  align-self: end;
  padding-bottom: 4px;
}

.cf-fields-head {
  display: grid;
  grid-template-columns: 48px minmax(120px, 160px) minmax(160px, 1fr) minmax(160px, 1fr) 80px;
  gap: 16px;
  padding: 12px 24px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.cf-fields {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cf-field {
  display: grid;
  grid-template-columns: 48px minmax(120px, 160px) minmax(160px, 1fr) minmax(160px, 1fr) 80px;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.cf-field:hover {
  background: var(--bg-elevated);
}

.cf-field:last-child {
  border-bottom: none;
}

.cf-field__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
  border: 1px solid rgba(255, 107, 0, 0.25);
}

.cf-field__name {
  min-width: 0;
}

.cf-field__name strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  white-space: normal;
  line-height: 1.35;
}

.cf-field__type {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: capitalize;
}

.cf-field__input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.875rem;
  background: var(--bg-input);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cf-field__input input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.15);
}

.cf-field__na {
  font-size: 0.875rem;
  color: var(--text-dim);
  padding-left: 4px;
}

.cf-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cf-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cf-switch__ui {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-light);
  position: relative;
  transition: background 0.2s;
}

.cf-switch__ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.cf-switch input:checked + .cf-switch__ui {
  background: var(--orange);
}

.cf-switch input:checked + .cf-switch__ui::after {
  transform: translateX(18px);
}

.cf-switch input:focus-visible + .cf-switch__ui {
  box-shadow: 0 0 0 3px rgba(255, 107, 44, 0.25);
}

.cf-options {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.cf-options__row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 40px;
  gap: 10px;
  padding: 10px 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.cf-options__row--head {
  background: var(--bg-elevated);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 8px 12px;
}

.cf-options__row--head span:last-child {
  visibility: hidden;
}

.cf-options__row input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: var(--font);
  background: var(--bg-input);
  color: var(--text);
}

.cf-options__row input:focus {
  outline: none;
  border-color: var(--orange);
}

.cf-options__remove {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.cf-options__remove:hover {
  background: var(--error-bg);
  color: var(--error-text);
}

.cf-add-option {
  margin-top: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1100px) {
  .cf-layout {
    grid-template-columns: 1fr;
  }
  .cf-layout__side {
    order: -1;
  }
}

@media (max-width: 900px) {
  .cf-fields-head {
    display: none;
  }
  .cf-field {
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      'icon name'
      'icon label'
      'icon placeholder'
      'icon switch';
    gap: 8px 12px;
    padding: 16px 20px;
  }
  .cf-field__icon { grid-area: icon; }
  .cf-field__name { grid-area: name; }
  .cf-field__input:nth-of-type(1) { grid-area: label; }
  .cf-field__input:nth-of-type(2) { grid-area: placeholder; }
  .cf-switch { grid-area: switch; justify-content: flex-start; }
}

@media (max-width: 768px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
  .admin-grid,
  .admin-repeater__item { grid-template-columns: 1fr; }
  .cf-header { flex-direction: column; }
}
