:root {
  --bg: #f4f7fb;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #e6ecf3;
  --blue: #2457d6;
  --blue-dark: #173b93;
  --sky: #eaf4ff;
  --green: #e8f7ef;
  --green-ink: #117241;
  --amber: #fff3d8;
  --amber-ink: #8a5a00;
  --red: #ffe8e8;
  --red-ink: #9d1c1c;
  --shadow: 0 24px 70px rgba(22, 38, 67, .11);
  --soft-shadow: 0 12px 34px rgba(22, 38, 67, .08);
  --radius: 28px;
}

* { box-sizing: border-box; }

body.neynaber-body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(36, 87, 214, .10), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(107, 203, 255, .15), transparent 24%),
    linear-gradient(180deg, #f9fbff 0%, #f4f7fb 55%, #ffffff 100%);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

.ny-container {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.ny-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230,236,243,.9);
}

.ny-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ny-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: -.035em;
  color: #1746c3;
  font-size: 22px;
}

.ny-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #2457d6, #6ac7ff);
  box-shadow: 0 14px 28px rgba(36,87,214,.23);
}

.ny-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ny-menu a, .ny-menu button {
  border: 0;
  background: transparent;
  color: #364152;
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.ny-menu a:hover, .ny-menu button:hover {
  background: var(--sky);
  color: var(--blue);
}

.ny-main {
  min-height: 62vh;
}

.ny-footer {
  margin-top: 70px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.ny-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  padding: 50px 0;
}

.ny-footer h2 {
  margin: 0 0 12px;
  font-size: 20px;
  letter-spacing: -.02em;
}

.ny-footer p {
  margin: 0;
  color: var(--muted);
}

.ny-map {
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  margin-top: 16px;
}

.ny-copyright {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

/* Homepage */
.home-hero {
  padding: 68px 0 46px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 42px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
}

.home-hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .95;
  letter-spacing: -.065em;
}

.lead {
  color: #465366;
  font-size: 20px;
  line-height: 1.7;
  max-width: 650px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  padding: 13px 19px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #38a8ff);
  color: white;
}

.btn-dark {
  background: #101828;
  color: white;
}

.btn-light {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.home-photo-card {
  position: relative;
  border-radius: 36px;
  padding: 14px;
  background: rgba(255,255,255,.72);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.88);
  transform: rotate(1deg);
}

.home-photo-card img {
  width: 100%;
  display: block;
  border-radius: 26px;
  aspect-ratio: 4 / 3.1;
  object-fit: cover;
}

.floating-note {
  position: absolute;
  left: -24px;
  bottom: 28px;
  width: min(280px, 76%);
  background: rgba(255,255,255,.92);
  border: 1px solid white;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--soft-shadow);
}

.floating-note strong {
  display: block;
  margin-bottom: 6px;
}

.home-section {
  padding: 44px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.05em;
  margin: 0 0 12px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card, .info-card, .dashboard-card {
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--soft-shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: var(--sky);
  color: var(--blue);
  font-size: 24px;
  margin-bottom: 18px;
}

.feature-card h3, .info-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.feature-card p, .info-card p {
  margin: 0;
  color: var(--muted);
}

.info-band {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 20px;
  align-items: stretch;
}

.check-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
}

/* Dashboard */
.dash-wrap {
  padding: 34px 0 64px;
}

.dash-hero {
  border-radius: 38px;
  background:
    radial-gradient(circle at 86% 16%, rgba(106,199,255,.45), transparent 24%),
    radial-gradient(circle at 14% 18%, rgba(36,87,214,.18), transparent 28%),
    rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
}

.dash-hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -.055em;
}

.dash-hero p {
  margin: 0;
  color: #4b5870;
  font-size: 17px;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin: 22px 0;
}

.stat-card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.stat-card small {
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  margin-top: 8px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.55fr .95fr;
  gap: 22px;
}

.panel {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.035em;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.item-list {
  display: grid;
}

.list-item {
  display: block;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  transition: .18s ease;
}

.list-item:hover {
  background: rgba(234,244,255,.72);
}

.list-item:last-child {
  border-bottom: 0;
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.item-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.item-sub {
  color: var(--muted);
  margin-top: 4px;
  font-size: 14px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge-blue { background: var(--sky); color: var(--blue-dark); }
.badge-dark { background: #101828; color: white; }
.badge-green { background: var(--green); color: var(--green-ink); }
.badge-amber { background: var(--amber); color: var(--amber-ink); }
.badge-red { background: var(--red); color: var(--red-ink); }
.badge-gray { background: #edf2f7; color: #344054; }

.empty-state {
  padding: 34px 26px;
  color: var(--muted);
}

.messages {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.message {
  border-radius: 18px;
  padding: 14px 18px;
  background: var(--green);
  color: var(--green-ink);
  font-weight: 750;
  border: 1px solid rgba(17,114,65,.14);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.45fr .85fr;
  gap: 22px;
  margin-top: 22px;
}

.stack {
  display: grid;
  gap: 18px;
}

.question-card {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
}

.question-title {
  font-weight: 900;
  font-size: 17px;
  margin-bottom: 12px;
}

.input, input[type="text"], input[type="number"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  background: white;
  padding: 12px 14px;
  font: inherit;
}

textarea {
  min-height: 120px;
}

label {
  font-weight: 850;
  display: block;
  margin-bottom: 8px;
}

.form-card {
  width: min(780px, 100%);
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.form-row {
  margin-bottom: 18px;
}

.helptext, .help-text {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.errorlist {
  color: var(--red-ink);
  background: var(--red);
  border-radius: 14px;
  padding: 10px 14px;
  list-style: none;
}

.table-wrap {
  overflow-x: auto;
}

.ny-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ny-table th {
  text-align: left;
  color: var(--muted);
  background: rgba(244,247,251,.78);
  padding: 14px 18px;
  font-weight: 900;
}

.ny-table td {
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.side-form {
  display: grid;
  gap: 13px;
}

.link-input {
  font-size: 12px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .home-hero,
  .info-band,
  .dash-grid,
  .detail-grid,
  .dash-hero {
    grid-template-columns: 1fr;
  }
  .feature-grid,
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-actions {
    justify-content: flex-start;
  }
  .floating-note {
    position: static;
    margin: -20px 18px 0;
    width: auto;
  }
}

@media (max-width: 640px) {
  .ny-nav, .ny-footer-grid {
    grid-template-columns: 1fr;
    display: grid;
  }
  .ny-menu {
    justify-content: flex-start;
  }
  .feature-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .home-hero h1 {
    font-size: 42px;
  }
}


.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.topic-chip {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--sky);
  color: var(--blue-dark);
  font-weight: 900;
  font-size: 13px;
}


.copy-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.copy-row .link-input {
  margin-top: 0;
}

.copy-btn.copied {
  background: var(--green) !important;
  color: var(--green-ink) !important;
}

.copy-feedback {
  min-height: 20px;
  margin-top: 8px;
  color: var(--green-ink);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .copy-row {
    grid-template-columns: 1fr;
  }
}

.delete-link {
  border: 0;
  background: transparent;
  color: var(--red-ink);
  font-weight: 900;
  cursor: pointer;
  padding: 6px 0;
}

.delete-link:hover {
  text-decoration: underline;
}

.danger-button {
  color: var(--red-ink) !important;
  border-color: rgba(157, 28, 28, .22) !important;
  background: var(--red) !important;
}


/* Compact delete icon buttons */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.delete-link {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border: 1px solid rgba(157, 28, 28, .18) !important;
  border-radius: 999px !important;
  background: var(--red) !important;
  color: var(--red-ink) !important;
  display: inline-grid !important;
  place-items: center !important;
  font-size: 16px !important;
  line-height: 1 !important;
  padding: 0 !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.delete-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(157, 28, 28, .12);
  text-decoration: none !important;
}

.badge.badge-red {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0 !important;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
}

.manage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.compact-panel .list-item {
  padding: 14px 18px;
}

.compact-panel .item-title {
  font-size: 15px;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.compact-panel .item-sub {
  font-size: 12px;
}

.compact-panel .item-top {
  align-items: center;
}

.compact-panel form {
  flex: 0 0 auto;
}

.panel,
.stat-card,
.list-item,
question-card {
  min-width: 0;
}

.item-top > * {
  min-width: 0;
}

@media (max-width: 980px) {
  .manage-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== FINAL DASHBOARD CLEANUP ===== */
.dash-wrap {
  padding: 34px 0 70px !important;
}

.dash-topline {
  background:
    radial-gradient(circle at 88% 14%, rgba(106,199,255,.35), transparent 24%),
    radial-gradient(circle at 12% 20%, rgba(36,87,214,.14), transparent 28%),
    rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  border-radius: 34px;
  padding: 34px;
  margin-bottom: 14px;
}

.dash-topline h1 {
  margin: 12px 0 10px;
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: 1;
  letter-spacing: -.06em;
}

.dash-topline p {
  margin: 0;
  max-width: 760px;
  color: #526173;
  font-size: 17px;
}

.dash-toolbar,
.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 22px;
}

.toolbar-btn,
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: #172033;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(22,38,67,.06);
  cursor: pointer;
  white-space: nowrap;
}

.toolbar-btn.primary,
.small-action.primary {
  background: linear-gradient(135deg, var(--blue), #38a8ff);
  border-color: transparent;
  color: #fff;
}

.toolbar-btn.dark {
  background: #101828;
  border-color: #101828;
  color: #fff;
}

.small-action.danger {
  background: var(--red);
  color: var(--red-ink);
  border-color: rgba(157,28,28,.18);
}

.small-action.warning {
  background: var(--amber);
  color: var(--amber-ink);
  border-color: rgba(138,90,0,.18);
}

.full-width {
  width: 100%;
}

.compact-stats {
  margin: 18px 0 22px !important;
}

.compact-stats .stat-card {
  padding: 16px !important;
  border-radius: 22px !important;
}

.compact-stats .stat-card strong {
  font-size: 28px !important;
}

.clean-grid,
.detail-clean-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 22px;
  align-items: start;
}

.manage-grid.clean-manage {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 22px !important;
  align-items: start;
  margin-top: 22px;
}

.clean-panel {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 26px;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  min-width: 0;
}

.clean-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.clean-panel-head h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.clean-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-padding {
  padding: 20px 22px;
}

.responsive-table {
  width: 100%;
  overflow-x: auto;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.clean-table th {
  text-align: left;
  color: var(--muted);
  background: rgba(244,247,251,.86);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 12px 14px;
}

.clean-table td {
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.clean-table.compact td {
  padding: 11px 14px;
}

.table-title {
  display: inline-block;
  max-width: 520px;
  font-weight: 900;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.table-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.table-actions,
.row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.table-actions form,
.row-actions form {
  margin: 0;
}

.icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 7px 18px rgba(22,38,67,.06);
}

.icon-btn.delete {
  background: var(--red);
  color: var(--red-ink);
  border-color: rgba(157,28,28,.16);
}

.icon-btn.view {
  background: var(--sky);
  color: var(--blue-dark);
  border-color: rgba(36,87,214,.16);
}

.icon-btn.pdf {
  width: auto;
  padding: 0 10px;
  background: var(--green);
  color: var(--green-ink);
  border-color: rgba(17,114,65,.15);
  font-size: 12px;
}

.empty-cell {
  color: var(--muted);
  padding: 22px !important;
}

.compact-list {
  display: grid;
}

.compact-result {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.compact-result:first-child {
  border-top: 0;
}

.compact-result strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

.compact-result span,
.compact-result em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  margin-top: 2px;
}

.compact-result b,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  background: var(--sky);
  color: var(--blue-dark);
  white-space: nowrap;
}

.status-pill.dark {
  background: #101828;
  color: #fff;
}

.status-pill.success {
  background: var(--green);
  color: var(--green-ink);
}

.status-pill.warning {
  background: var(--amber);
  color: var(--amber-ink);
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.topic-groups {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.topic-group {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
}

.topic-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(234,244,255,.55);
}

.topic-head h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.topic-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.question-row strong {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.answer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.answer-chips span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f5f9;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.side-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.side-row:first-child {
  border-top: 0;
}

.side-row strong,
.link-card strong {
  display: block;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.side-row span,
.link-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.link-card {
  padding: 16px;
  border-top: 1px solid var(--line);
}

.link-card:first-child {
  border-top: 0;
}

.link-card-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
}

.copy-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center;
  margin-top: 10px;
}

.copy-row input {
  min-width: 0;
}

.copy-feedback {
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 800;
  min-height: 18px;
  margin-top: 5px;
}

.new-link-panel {
  margin: 0 0 22px;
  border: 2px solid rgba(36,87,214,.16);
}

input,
textarea,
select {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .clean-grid,
  .detail-clean-grid,
  .manage-grid.clean-manage {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .dash-topline {
    padding: 24px;
    border-radius: 26px;
  }

  .dash-topline h1 {
    font-size: 38px;
  }

  .stat-grid.compact-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .clean-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-row {
    grid-template-columns: 1fr !important;
  }

  .table-actions {
    display: table-cell;
  }

  .top-actions {
    align-items: stretch;
  }
}


/* CMS editor */
.cms-form {
  display: grid;
  gap: 22px;
}

.cms-grid {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.cms-grid .wide {
  grid-column: 1 / -1;
}

.sticky-save {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 999px;
  box-shadow: var(--shadow);
  padding: 10px;
  width: fit-content;
  backdrop-filter: blur(12px);
}

/* Fix: Fragebogen-Tabelle Spalte Erstellt */
.clean-table th:nth-child(4),
.clean-table td:nth-child(4) {
  white-space: nowrap;
  min-width: 92px;
}

.clean-table th:first-child,
.clean-table td:first-child {
  min-width: 260px;
}

@media (max-width: 880px) {
  .cms-grid {
    grid-template-columns: 1fr;
  }

  .clean-table th:nth-child(4),
  .clean-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 620px) {
  .clean-table th:nth-child(2),
  .clean-table td:nth-child(2),
  .clean-table th:nth-child(3),
  .clean-table td:nth-child(3) {
    display: none;
  }

  .clean-table th:first-child,
  .clean-table td:first-child {
    min-width: 220px;
  }
}


/* Frontend inline editor */
.frontend-adminbar {
  position: sticky;
  top: 74px;
  z-index: 45;
  background: rgba(16,24,40,.94);
  color: #fff;
  box-shadow: 0 14px 36px rgba(16,24,40,.18);
}

.frontend-adminbar-inner {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.frontend-adminbar a,
.frontend-adminbar button {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  margin-left: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.frontend-adminbar button {
  background: #38a8ff;
}

.editable-section {
  position: relative;
  outline: 2px dashed rgba(36,87,214,.28);
  outline-offset: 12px;
  border-radius: 28px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.edit-label {
  position: absolute;
  top: -18px;
  left: 18px;
  display: inline-flex;
  background: #2457d6;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
  z-index: 2;
}

.inline-image-editor {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  margin-top: 14px;
  box-shadow: var(--soft-shadow);
}

.extra-box-head {
  margin-top: 34px;
}

.inline-box-card form,
.new-box-card form {
  display: grid;
  gap: 10px;
}

.inline-box-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: auto;
}

/* HARD FIX: Fragebogen table actions not over created column */
.questionnaire-table {
  table-layout: fixed !important;
  width: 100%;
}

.questionnaire-table .col-title { width: auto; }
.questionnaire-table .col-count { width: 82px; }
.questionnaire-table .col-created { width: 112px; }
.questionnaire-table .col-actions { width: 92px; }

.questionnaire-table .actions-col {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  text-align: right !important;
  white-space: nowrap !important;
}

.questionnaire-table .created-col {
  width: 112px !important;
  min-width: 112px !important;
  white-space: nowrap !important;
}

.questionnaire-table .table-actions {
  display: table-cell !important;
}

.questionnaire-table .table-actions > a,
.questionnaire-table .table-actions > form {
  display: inline-grid !important;
  vertical-align: middle;
  margin-left: 4px;
}

.questionnaire-table .table-title,
.questionnaire-table .table-sub {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .questionnaire-table .col-created,
  .questionnaire-table .created-col {
    display: none !important;
  }

  .questionnaire-table .col-count {
    width: 66px;
  }

  .questionnaire-table .col-actions,
  .questionnaire-table .actions-col {
    width: 86px !important;
    min-width: 86px !important;
    max-width: 86px !important;
  }
}

@media (max-width: 640px) {
  .frontend-adminbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .frontend-adminbar a,
  .frontend-adminbar button {
    margin: 4px 4px 0 0;
  }

  .questionnaire-table .col-count,
  .questionnaire-table th:nth-child(2),
  .questionnaire-table td:nth-child(2),
  .questionnaire-table th:nth-child(3),
  .questionnaire-table td:nth-child(3) {
    display: none !important;
  }
}
