/* QwickPe testimonial stories and moderation workspace */

.stories-page {
  position: relative;
  overflow: hidden;
}

.stories-page button,
.stories-page input,
.stories-page textarea,
.stories-page select,
.testimonial-admin-page button,
.testimonial-admin-page input,
.testimonial-admin-page textarea,
.testimonial-admin-page select {
  font: inherit;
}

.stories-hero {
  min-height: 720px;
  padding: 176px 0 96px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 78% 24%, rgba(37, 99, 235, 0.12), transparent 28%),
    radial-gradient(circle at 10% 78%, rgba(16, 185, 129, 0.1), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f8fafc 100%);
}

.stories-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.stories-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(56px, 8vw, 112px);
}

.stories-hero-copy {
  max-width: 690px;
}

.stories-eyebrow,
.stories-kicker {
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stories-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}

.stories-eyebrow > span {
  width: 25px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.stories-hero h1 {
  max-width: 660px;
  margin: 0 0 24px;
  color: #0b1731;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.stories-hero h1 em {
  color: var(--blue);
  font-style: normal;
  position: relative;
  white-space: nowrap;
}

.stories-hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 1%;
  bottom: -6px;
  height: 8px;
  border-radius: 50%;
  border-top: 3px solid rgba(16, 185, 129, 0.75);
  transform: rotate(-2deg);
}

.stories-hero-copy > p {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.stories-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 28px;
}

.story-primary-action,
.story-secondary-action {
  min-height: 50px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 13px;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.story-primary-action {
  background: #0f172a;
  color: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.story-primary-action span {
  font-size: 1.15rem;
}

.story-secondary-action {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.09);
}

.story-primary-action:hover,
.story-secondary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 34px rgba(15, 23, 42, 0.14);
}

.stories-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 590px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.55;
}

.stories-privacy-note strong {
  color: #334155;
}

.stories-privacy-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-dark);
  font-size: 0.68rem;
  font-weight: 900;
}

.stories-hero-panel {
  position: relative;
  padding: 38px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 34px 80px rgba(30, 64, 175, 0.13), inset 0 1px 0 #fff;
  backdrop-filter: blur(20px);
}

.stories-hero-panel::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
}

.stories-hero-quote {
  position: absolute;
  top: -20px;
  left: 18px;
  color: rgba(37, 99, 235, 0.09);
  font-family: Georgia, serif;
  font-size: 8rem;
  line-height: 1;
}

.stories-hero-panel-label {
  position: relative;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stories-hero-stars {
  margin: 18px 0 4px;
  color: #f4b527;
  font-size: 1.45rem;
  letter-spacing: 0.16em;
}

.stories-hero-score {
  display: block;
  color: #0f172a;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4.6rem;
  letter-spacing: -0.07em;
  line-height: 1;
}

.stories-hero-score-label {
  color: #64748b;
  font-size: 0.78rem;
}

.stories-metrics {
  margin-top: 30px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.stories-metrics div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stories-metrics strong {
  color: #0f172a;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
}

.stories-metrics span {
  color: #94a3b8;
  font-size: 0.64rem;
  line-height: 1.3;
}

.community-stories {
  padding: 106px 0 112px;
  background: #fff;
}

.stories-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 34px;
}

.stories-section-heading h2,
.share-story-intro h2 {
  margin-top: 10px;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.04em;
}

.stories-section-heading > p {
  max-width: 390px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.story-toolbar {
  margin-bottom: 30px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  background: #f8fafc;
}

.story-filter-group {
  display: flex;
  gap: 4px;
}

.story-filter {
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
}

.story-filter.is-active {
  color: #0f172a;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.story-live-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 8px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.story-live-label > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.story-card {
  min-width: 0;
  padding: 27px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e7ecf3;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.story-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.09);
}

.story-card--featured {
  background: linear-gradient(145deg, #f8fbff, #fff 55%);
  border-color: rgba(37, 99, 235, 0.18);
}

.story-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
}

.story-role,
.story-verified {
  font-size: 0.66rem;
  font-weight: 800;
}

.story-role {
  padding: 5px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.story-role--buyer {
  color: #1d4ed8;
  background: #eff6ff;
}

.story-role--cardholder {
  color: #047857;
  background: #ecfdf5;
}

.story-role--both {
  color: #6d28d9;
  background: #f5f3ff;
}

.story-verified {
  color: #8290a5;
  text-align: right;
}

.story-rating {
  margin-bottom: 14px;
  color: #f3b321;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
}

.story-card h3 {
  margin-bottom: 13px;
  color: #0f172a;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.story-card > p {
  flex: 1;
  color: #526076;
  font-size: 0.84rem;
  line-height: 1.75;
}

.story-outcome {
  align-self: flex-start;
  margin: 20px 0;
  padding: 7px 11px;
  color: #047857;
  border: 1px solid #d1fae5;
  border-radius: 9px;
  background: #f0fdf4;
  font-size: 0.72rem;
  font-weight: 800;
}

.story-official-reply {
  margin: 2px 0 20px;
  padding: 14px;
  color: #475569;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: #f8fafc;
  font-size: 0.75rem;
  line-height: 1.6;
}

.story-official-reply strong {
  display: block;
  margin-bottom: 3px;
  color: #1d4ed8;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-card footer {
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid #edf1f6;
}

.story-card footer > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.story-card footer strong {
  color: #172033;
  font-size: 0.79rem;
}

.story-card footer small {
  color: #94a3b8;
  font-size: 0.68rem;
}

.story-avatar {
  width: 37px;
  height: 37px;
  flex: 0 0 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  font-size: 0.8rem;
  font-weight: 900;
}

.story-avatar--green { background: linear-gradient(135deg, #059669, #34d399); }
.story-avatar--purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.stories-empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  background: #f8fafc;
}

.stories-empty > span { color: var(--blue); font-size: 1.8rem; }
.stories-empty h3 { margin: 8px 0 4px; color: #0f172a; }
.stories-empty p { color: #64748b; font-size: 0.86rem; }
.stories-empty a { display: inline-block; margin-top: 14px; color: var(--blue); font-size: 0.8rem; font-weight: 800; }

.share-story-section {
  padding: 112px 0 120px;
  background:
    radial-gradient(circle at 5% 12%, rgba(16, 185, 129, 0.09), transparent 24%),
    linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.share-story-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(560px, 1.28fr);
  align-items: start;
  gap: clamp(44px, 7vw, 92px);
}

.share-story-intro {
  position: sticky;
  top: 130px;
}

.share-story-intro > p {
  margin-top: 18px;
  color: #5b687c;
  font-size: 0.94rem;
  line-height: 1.75;
}

.story-process {
  margin-top: 36px;
  display: grid;
  gap: 22px;
  list-style: none;
}

.story-process li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
}

.story-process li > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
  border-radius: 11px;
  background: #eff6ff;
  font-size: 0.72rem;
  font-weight: 900;
}

.story-process strong {
  color: #1e293b;
  font-size: 0.84rem;
}

.story-process p {
  margin-top: 3px;
  color: #758196;
  font-size: 0.76rem;
  line-height: 1.55;
}

.story-help-card {
  margin-top: 34px;
  padding: 17px;
  display: flex;
  gap: 12px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 15px;
  background: rgba(236, 253, 245, 0.72);
}

.story-help-card > span { font-size: 1.1rem; }
.story-help-card strong { color: #065f46; font-size: 0.78rem; }
.story-help-card p { margin-top: 3px; color: #527267; font-size: 0.72rem; line-height: 1.5; }

.story-form-card {
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.1);
}

.story-form-heading {
  margin-bottom: 34px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #e9eef5;
}

.story-form-heading > div > span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-form-heading h3 {
  margin-top: 3px;
  color: #0f172a;
  font-size: 1.45rem;
}

.story-form-time {
  padding: 7px 10px;
  white-space: nowrap;
  color: #64748b;
  border-radius: 99px;
  background: #f1f5f9;
  font-size: 0.67rem;
  font-weight: 700;
}

.story-fieldset {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

.story-fieldset legend,
.story-field > label,
.story-label-row label {
  margin-bottom: 9px;
  display: block;
  color: #263247;
  font-size: 0.76rem;
  font-weight: 800;
}

.story-fieldset legend > span,
.story-field > label > span,
.story-label-row label > span,
.story-consent b {
  color: #dc2626;
}

.story-field label em {
  margin-left: 5px;
  color: #94a3b8;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 600;
}

.role-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.role-options label {
  position: relative;
  cursor: pointer;
}

.role-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-options label > span {
  min-height: 92px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #dde4ed;
  border-radius: 13px;
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.role-options b { margin-bottom: 5px; font-size: 1rem; }
.role-options strong { color: #1e293b; font-size: 0.76rem; }
.role-options small { margin-top: 2px; color: #8a96a8; font-size: 0.62rem; line-height: 1.35; }

.role-options input:checked + span {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.role-options input:focus-visible + span,
.rating-input input:focus-visible + label,
.story-consent input:focus-visible,
.whatsapp-option input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.rating-input {
  min-height: 47px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.rating-input input {
  position: absolute;
  opacity: 0;
}

.rating-input label {
  color: #dbe1e9;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  transition: color 120ms ease, transform 120ms ease;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: #f3b321;
}

.rating-input label:hover { transform: scale(1.1); }

.rating-description {
  margin-left: 9px;
  color: #8290a5;
  font-size: 0.7rem;
  font-weight: 700;
}

.story-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.story-field {
  margin-bottom: 22px;
}

.story-field input,
.story-field textarea,
.story-field select,
.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  color: #172033;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  outline: none;
  background: #fbfcfe;
  font-size: 0.82rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.story-field input,
.story-field select,
.admin-field input,
.admin-field select {
  min-height: 47px;
  padding: 10px 13px;
}

.story-field textarea,
.admin-field textarea {
  min-height: 150px;
  padding: 13px;
  resize: vertical;
  line-height: 1.65;
}

.story-field input:focus,
.story-field textarea:focus,
.story-field select:focus,
.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.09);
}

.story-field input[aria-invalid="true"],
.story-field textarea[aria-invalid="true"],
.story-field select[aria-invalid="true"] {
  border-color: #f87171;
}

.story-field > small {
  display: block;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.62rem;
  line-height: 1.4;
}

.whatsapp-option {
  margin-top: 8px !important;
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  color: #64748b !important;
  font-size: 0.66rem !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.whatsapp-option input {
  width: 15px;
  min-height: 15px;
  height: 15px;
  accent-color: var(--green-dark);
}

.story-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.story-label-row > span {
  color: #94a3b8;
  font-size: 0.65rem;
}

.story-prompts {
  margin-bottom: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.story-prompts button {
  padding: 6px 9px;
  color: #526176;
  border: 1px solid #e0e7f0;
  border-radius: 99px;
  background: #f8fafc;
  font-size: 0.64rem;
  font-weight: 700;
}

.story-prompts button:hover {
  color: var(--blue-dark);
  border-color: #bfdbfe;
  background: #eff6ff;
}

.story-field-error {
  min-height: 0;
  margin-top: 5px;
  color: #dc2626;
  font-size: 0.66rem;
  font-weight: 600;
}

.story-field-error:empty { display: none; }

.story-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.story-consent {
  display: grid;
  grid-template-columns: 17px 1fr;
  align-items: start;
  gap: 10px;
  color: #667389;
  font-size: 0.69rem;
  line-height: 1.55;
  cursor: pointer;
}

.story-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.story-submit-row {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.story-submit {
  min-height: 50px;
  flex: 0 0 auto;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  font-size: 0.78rem;
  font-weight: 800;
}

.story-submit:hover { transform: translateY(-1px); }
.story-submit:disabled { opacity: 0.65; cursor: wait; transform: none; }
.story-submit b { font-size: 1rem; }

.story-submit-row > p {
  color: #94a3b8;
  font-size: 0.61rem;
  line-height: 1.5;
}

.story-submit-row a { color: #64748b; text-decoration: underline; }

.story-form-status {
  margin-top: 14px;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 700;
}

.story-success {
  min-height: 440px;
  padding: 70px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.story-success[hidden] { display: none; }

.story-success-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 20px;
  background: linear-gradient(135deg, #059669, #34d399);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.24);
  font-size: 1.6rem;
  font-weight: 900;
}

.story-success h3 { margin: 24px 0 10px; color: #0f172a; font-size: 1.5rem; }
.story-success p { max-width: 460px; color: #64748b; font-size: 0.86rem; line-height: 1.7; }
.story-success button { margin-top: 24px; padding: 10px 16px; color: var(--blue); border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; font-size: 0.74rem; font-weight: 800; }

/* Admin moderation */
.testimonial-admin-page {
  min-height: 100vh;
  padding: 40px 24px 80px;
  color: #0f172a;
  background: #f1f5f9;
}

.admin-shell { max-width: 1180px; margin: 0 auto; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.admin-brand { display: flex; align-items: center; gap: 11px; color: #0f172a; }
.admin-brand img { width: 42px; height: 42px; object-fit: contain; }
.admin-brand strong { display: block; font-family: 'Space Grotesk', sans-serif; }
.admin-brand small { display: block; color: #64748b; font-size: 0.68rem; }
.admin-back-link { color: #475569; font-size: 0.76rem; font-weight: 700; }

.admin-auth-card {
  max-width: 440px;
  margin: 80px auto;
  padding: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

.admin-auth-card h1 { font-size: 1.8rem; }
.admin-auth-card > p { margin: 9px 0 26px; color: #64748b; font-size: 0.82rem; line-height: 1.6; }
.admin-field { margin-bottom: 16px; }
.admin-field label { display: block; margin-bottom: 7px; color: #334155; font-size: 0.72rem; font-weight: 800; }
.admin-primary-button { width: 100%; min-height: 46px; color: #fff; border: 0; border-radius: 11px; background: #0f172a; font-size: 0.78rem; font-weight: 800; }
.admin-primary-button:disabled { opacity: .6; cursor: wait; }
.admin-reset-button { width:100%; margin-top:10px; padding:8px; color:#2563eb; border:0; background:transparent; font-size:.7rem; font-weight:800; }
.admin-auth-status { min-height: 20px; margin-top: 12px; color: #b91c1c; font-size: 0.7rem; font-weight: 700; }

.admin-workspace[hidden],
.admin-auth-card[hidden],
.admin-modal[hidden] { display: none; }

.admin-workspace-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-workspace-header h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -0.04em; }
.admin-workspace-header p { color: #64748b; font-size: 0.82rem; }
.admin-header-actions { display: flex; gap: 8px; }
.admin-action-button { padding: 10px 14px; color: #334155; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; font-size: 0.72rem; font-weight: 800; }
.admin-action-button--primary { color: #fff; border-color: #2563eb; background: #2563eb; }

.admin-tabs { margin-bottom: 26px; padding: 7px; display: flex; gap: 5px; overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 14px; background: rgba(255,255,255,.8); }
.admin-tab { padding: 10px 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #64748b; border: 0; border-radius: 9px; background: transparent; font-size: .72rem; font-weight: 800; }
.admin-tab span { min-width: 20px; padding: 2px 6px; color: #64748b; border-radius: 99px; background: #e2e8f0; font-size: .61rem; }
.admin-tab.is-active { color: #fff; background: #0f172a; box-shadow: 0 7px 16px rgba(15,23,42,.16); }
.admin-tab.is-active span { color: #0f172a; background: #fff; }
.admin-panel[hidden] { display: none; }
.admin-panel-heading { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.admin-panel-heading > div > span { color: #2563eb; font-size: .65rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.admin-panel-heading h2 { margin-top: 3px; font-size: 1.45rem; }
.admin-panel-heading > p { max-width: 460px; color: #64748b; font-size: .74rem; text-align: right; }

.admin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.admin-summary--four { grid-template-columns: repeat(4,1fr); }
.admin-summary--five { grid-template-columns: repeat(5,1fr); }
.admin-summary-card { padding: 18px; text-align: left; border: 1px solid #e2e8f0; border-radius: 15px; background: #fff; }
button.admin-summary-card { cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
button.admin-summary-card:hover { transform: translateY(-2px); border-color: #bfdbfe; box-shadow: 0 12px 26px rgba(15,23,42,.07); }
.admin-summary-card span { color: #64748b; font-size: 0.68rem; font-weight: 700; }
.admin-summary-card strong { display: block; margin-top: 3px; font-family: 'Space Grotesk', sans-serif; font-size: 1.65rem; }
.admin-summary-card small { display:block; margin-top:10px; color:#2563eb; font-size:.61rem; font-weight:800; }

.admin-privacy-banner { margin-top:24px; padding:20px; display:flex; gap:14px; color:#475569; border:1px solid #dbeafe; border-radius:15px; background:#eff6ff; }
.admin-privacy-banner > span { font-size:1.25rem; }
.admin-privacy-banner strong { color:#1e3a8a; font-size:.78rem; }
.admin-privacy-banner p { margin-top:3px; font-size:.7rem; line-height:1.55; }

.admin-filters { margin-bottom: 18px; padding: 8px; display: flex; gap: 5px; border: 1px solid #e2e8f0; border-radius: 13px; background: #fff; }
.admin-filter { padding: 8px 13px; color: #64748b; border: 0; border-radius: 9px; background: transparent; font-size: 0.7rem; font-weight: 800; }
.admin-filter.is-active { color: #0f172a; background: #f1f5f9; }

.moderation-list { display: grid; gap: 14px; }
.moderation-card { padding: 22px; border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.moderation-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.moderation-identity { display: flex; gap: 11px; }
.moderation-identity .story-avatar { border-radius: 11px; }
.moderation-identity strong { display: block; font-size: 0.86rem; }
.moderation-identity span { color: #64748b; font-size: 0.69rem; }
.moderation-status { padding: 5px 9px; border-radius: 99px; font-size: 0.63rem; font-weight: 900; text-transform: uppercase; }
.moderation-status--pending { color: #92400e; background: #fffbeb; }
.moderation-status--approved { color: #065f46; background: #ecfdf5; }
.moderation-status--rejected { color: #991b1b; background: #fef2f2; }
.moderation-meta { margin: 16px 0; display: flex; flex-wrap: wrap; gap: 7px; }
.moderation-meta span { padding: 5px 8px; color: #526176; border-radius: 7px; background: #f1f5f9; font-size: 0.64rem; font-weight: 700; }
.moderation-card h3 { margin-bottom: 7px; font-size: 1rem; }
.moderation-story { color: #475569; font-size: 0.79rem; line-height: 1.7; white-space: pre-wrap; }
.moderation-private { margin-top: 15px; padding: 12px; color: #7c5e16; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; font-size: 0.68rem; line-height: 1.6; }
.moderation-reply { margin-top: 15px; }
.moderation-reply label { display: block; margin-bottom: 6px; color: #475569; font-size: 0.68rem; font-weight: 800; }
.moderation-reply textarea { width: 100%; min-height: 72px; padding: 10px; border: 1px solid #dbe2eb; border-radius: 10px; resize: vertical; font-size: 0.73rem; }
.moderation-actions { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 8px; }
.moderation-actions button { padding: 8px 11px; border: 1px solid #dbe2eb; border-radius: 9px; background: #fff; font-size: 0.67rem; font-weight: 800; }
.moderation-actions .approve { color: #fff; border-color: #059669; background: #059669; }
.moderation-actions .reject { color: #92400e; background: #fffbeb; }
.moderation-actions .delete { color: #b91c1c; margin-left: auto; }
.admin-empty { padding: 50px 20px; color: #64748b; text-align: center; border: 1px dashed #cbd5e1; border-radius: 17px; background: rgba(255,255,255,.65); }

.admin-data-list { display:grid; gap:12px; }
.admin-data-card { padding:20px; border:1px solid #e2e8f0; border-radius:16px; background:#fff; box-shadow:0 7px 22px rgba(15,23,42,.035); }
.admin-data-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.admin-data-card-head h3 { font-size:.9rem; }
.admin-data-card-head p { margin-top:2px; color:#64748b; font-size:.68rem; }
.admin-data-status { padding:5px 9px; white-space:nowrap; border-radius:99px; color:#1d4ed8; background:#eff6ff; font-size:.61rem; font-weight:900; text-transform:uppercase; }
.admin-data-status--new,.admin-data-status--pending { color:#92400e; background:#fffbeb; }
.admin-data-status--processed,.admin-data-status--read,.admin-data-status--active { color:#065f46; background:#ecfdf5; }
.admin-data-body { margin-top:14px; color:#475569; font-size:.76rem; line-height:1.65; white-space:pre-wrap; }
.admin-data-meta { margin-top:12px; display:flex; flex-wrap:wrap; gap:7px; }
.admin-data-meta span { padding:5px 8px; color:#526176; border-radius:7px; background:#f1f5f9; font-size:.63rem; font-weight:700; }
.admin-data-actions { margin-top:15px; display:flex; flex-wrap:wrap; gap:8px; }
.admin-data-actions button { padding:8px 11px; color:#334155; border:1px solid #dbe2eb; border-radius:9px; background:#fff; font-size:.66rem; font-weight:800; }
.admin-data-actions .primary { color:#fff; border-color:#2563eb; background:#2563eb; }
.admin-data-actions .danger { margin-left:auto; color:#b91c1c; }

.admin-modal { position: fixed; inset: 0; z-index: 1000; padding: 24px; display: grid; place-items: center; background: rgba(15,23,42,.5); backdrop-filter: blur(6px); }
.admin-modal-card { width: min(680px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 30px; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(15,23,42,.25); }
.admin-modal-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.admin-modal-head h2 { font-size: 1.4rem; }
.admin-modal-head button { width: 34px; height: 34px; color: #475569; border: 1px solid #e2e8f0; border-radius: 9px; background: #fff; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-modal .admin-field textarea { min-height: 110px; }
.admin-modal-status { min-height: 18px; margin-top: 10px; color: #b91c1c; font-size: .7rem; font-weight: 700; }

@media (max-width: 920px) {
  .stories-hero-grid,
  .share-story-layout { grid-template-columns: 1fr; }
  .stories-hero-copy { max-width: 760px; }
  .stories-hero-panel { max-width: 560px; }
  .stories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-story-intro { position: static; max-width: 650px; }
  .admin-summary--four,.admin-summary--five { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 680px) {
  .stories-hero { min-height: auto; padding: 135px 0 68px; }
  .stories-hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .stories-hero-copy > p { font-size: 0.94rem; }
  .stories-section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .stories-grid { grid-template-columns: 1fr; }
  .story-toolbar { align-items: flex-start; flex-direction: column; }
  .story-live-label { padding: 4px 9px 7px; }
  .story-form-grid { grid-template-columns: 1fr; gap: 0; }
  .role-options { grid-template-columns: 1fr; }
  .role-options label > span { min-height: 72px; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; column-gap: 5px; }
  .role-options b { grid-row: 1 / 3; }
  .story-submit-row { align-items: stretch; flex-direction: column; }
  .story-submit { justify-content: space-between; }
  .admin-workspace-header { align-items: flex-start; flex-direction: column; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-summary--four,.admin-summary--five { grid-template-columns:1fr 1fr; }
  .admin-panel-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .admin-panel-heading > p { text-align:left; }
  .admin-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stories-hero { padding: 124px 0 64px !important; }
  .community-stories { padding: 72px 0 !important; }
  .share-story-section { padding: 72px 0 82px !important; }
  .stories-hero-actions { align-items: stretch; flex-direction: column; }
  .story-primary-action,
  .story-secondary-action { width: 100%; }
  .stories-hero-panel { padding: 30px 20px; border-radius: 22px; }
  .stories-hero-score { font-size: 3.8rem; }
  .stories-metrics { gap: 4px; }
  .story-filter-group { width: 100%; overflow-x: auto; }
  .story-filter { white-space: nowrap; }
  .story-card { padding: 23px; }
  .story-form-card { margin: 0 -2px; border-radius: 21px; }
  .story-form-heading { align-items: flex-start; }
  .rating-input label { font-size: 1.65rem; }
  .rating-description { margin-left: 6px; font-size: 0.62rem; }
  .testimonial-admin-page { padding: 22px 14px 60px; }
  .admin-topbar { align-items: flex-start; }
  .admin-auth-card { margin: 35px auto; padding: 26px 22px; }
  .admin-header-actions { width: 100%; }
  .admin-header-actions button { flex: 1; }
  .admin-filters { overflow-x: auto; }
  .admin-summary--four,.admin-summary--five { grid-template-columns:1fr; }
  .admin-filter { white-space: nowrap; }
  .moderation-card { padding: 18px; }
  .moderation-card-top { flex-direction: column; }
  .moderation-actions .delete { margin-left: 0; }
  .admin-data-actions .danger { margin-left:0; }
  .admin-modal { padding: 10px; }
  .admin-modal-card { max-height: calc(100vh - 20px); padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .story-card,
  .story-primary-action,
  .story-secondary-action,
  .rating-input label { transition: none; }
}
