@font-face {
  font-family: 'Al Mohannad';
  src: url('/tahani/public/assets/fonts/al-mohanad.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  font-family: 'Cairo', 'Noto Kufi Arabic', Tahoma, Arial, sans-serif;
  color-scheme: light;
  --bg: #eef4ff;
  --surface: rgba(245, 249, 255, 0.86);
  --surface-strong: #fcfdff;
  --line: rgba(40, 76, 133, 0.12);
  --line-strong: rgba(40, 76, 133, 0.24);
  --ink: #10203d;
  --muted: #5a6f95;
  --accent: #2e6bcb;
  --accent-deep: #0f2f68;
  --accent-soft: #d8e8ff;
  --hero-glow: rgba(74, 124, 221, 0.18);
  --shadow: 0 24px 60px rgba(20, 48, 94, 0.12);
  --entity-work: linear-gradient(135deg, #123d84, #3a7be0);
  --entity-personal: linear-gradient(135deg, #123d84, #3a7be0);
}

* {
  box-sizing: border-box;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(69, 122, 220, 0.14), transparent 26%),
    radial-gradient(circle at bottom left, rgba(18, 61, 132, 0.1), transparent 24%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
}

body[data-active-collection="personal"] {
  --accent: #2e6bcb;
  --accent-deep: #0f2f68;
  --accent-soft: #d8e8ff;
  --hero-glow: rgba(74, 124, 221, 0.18);
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

main {
  position: relative;
  min-height: calc(100vh - 168px);
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background:
    linear-gradient(135deg, rgba(7, 21, 49, 0.94), rgba(12, 39, 86, 0.94) 52%, rgba(24, 77, 154, 0.92));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(7, 21, 49, 0.28);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.navbar__logo {
  flex: 0 0 auto;
}

.navbar__logo img {
  height: 52px;
  width: auto;
  filter: brightness(1.08) drop-shadow(0 10px 22px rgba(6, 16, 37, 0.34));
}

.navbar__entities {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.entity-link {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px rgba(7, 21, 49, 0.18);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease, filter 180ms ease;
}

.entity-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 34px rgba(7, 21, 49, 0.26);
}

.entity-link[data-collection="work"] {
  background: linear-gradient(180deg, rgba(15, 47, 104, 0.7), rgba(34, 92, 183, 0.58));
}

.entity-link[data-collection="personal"] {
  background: linear-gradient(180deg, rgba(15, 47, 104, 0.7), rgba(34, 92, 183, 0.58));
}

.entity-link.is-active {
  border-color: rgba(255, 255, 255, 0.34);
  filter: saturate(1.08) brightness(1.02);
  transform: translateY(-2px);
}

.entity-link.is-active[data-collection="work"] {
  background: var(--entity-work);
  box-shadow: 0 22px 34px rgba(28, 82, 167, 0.34), 0 0 0 4px rgba(89, 143, 235, 0.14);
}

.entity-link.is-active[data-collection="personal"] {
  background: var(--entity-personal);
  box-shadow: 0 22px 34px rgba(28, 82, 167, 0.34), 0 0 0 4px rgba(89, 143, 235, 0.14);
}

.entity-link img {
  max-height: 42px;
  width: auto;
  filter: drop-shadow(0 8px 14px rgba(7, 21, 49, 0.22));
}

.entity-link__label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  text-shadow: 0 1px 8px rgba(7, 21, 49, 0.18);
}

.home-page {
  padding: 34px 0 56px;
}

.hero-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 34px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 36px;
  background:
    radial-gradient(circle at top right, var(--hero-glow), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(232, 242, 255, 0.88));
  box-shadow: 0 24px 70px rgba(20, 48, 94, 0.12);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: auto auto -90px -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow), transparent 68%);
}

.hero-section__content,
.hero-showcase {
  position: relative;
  z-index: 1;
}

.hero-section__eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.96), rgba(224, 237, 255, 0.9));
  color: var(--accent-deep);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(46, 107, 203, 0.12);
}

.hero-section__title {
  margin: 0;
  max-width: 12ch;
  color: var(--ink);
  font-family: 'Noto Kufi Arabic', 'Cairo', Tahoma, Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.25;
}

.hero-section__text {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 2;
}

.hero-section__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.hero-button:hover {
  transform: translateY(-2px);
}

.hero-button--primary {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  box-shadow: 0 18px 30px rgba(20, 48, 94, 0.24);
}

.hero-button--secondary {
  border-color: rgba(46, 107, 203, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-stat-card {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(46, 107, 203, 0.1);
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.96), rgba(228, 239, 255, 0.92));
  box-shadow: 0 16px 34px rgba(20, 48, 94, 0.08);
}

.hero-stat-card strong {
  color: var(--accent-deep);
  font-size: 1.6rem;
  line-height: 1;
}

.hero-stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-showcase {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-showcase__panel {
  width: min(100%, 390px);
  position: relative;
  padding: 24px 24px 28px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(229, 239, 255, 0.82));
  box-shadow: 0 26px 54px rgba(20, 48, 94, 0.14);
  overflow: hidden;
  isolation: isolate;
}

.hero-showcase__panel::before {
  content: '';
  position: absolute;
  inset: 14px auto auto -42px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 140, 236, 0.22), transparent 68%);
}

.hero-showcase__panel::after {
  content: '';
  position: absolute;
  inset: auto -34px 8px auto;
  width: 160px;
  height: 160px;
  border-radius: 34px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(111, 176, 255, 0.08) 46%, transparent 72%);
  filter: blur(8px);
}

.hero-showcase__label {
  position: relative;
  z-index: 2;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-showcase__stack {
  position: relative;
  min-height: 440px;
  margin-top: 4px;
  perspective: 1200px;
}

.hero-showcase__card {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(236, 244, 255, 0.8));
  box-shadow: 0 28px 52px rgba(20, 48, 94, 0.16);
  transform-origin: center;
  backface-visibility: hidden;
}

.hero-showcase__card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.26), transparent 34%, transparent 62%, rgba(168, 203, 255, 0.18));
  z-index: 1;
  pointer-events: none;
}

.hero-showcase__card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(15, 47, 104, 0.16));
  z-index: 1;
}

.hero-showcase__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-showcase__card--1 {
  position: absolute;
  inset: 44px 44px 0 24px;
  z-index: 3;
  min-height: 348px;
  transform: rotate(-9deg) translateZ(0);
  animation: showcase-float-main 6.5s ease-in-out infinite;
}

.hero-showcase__card--2 {
  position: absolute;
  inset: 6px 18px auto 118px;
  z-index: 1;
  min-height: 214px;
  opacity: 0.9;
  transform: rotate(13deg) translateZ(0);
  animation: showcase-float-back 7.2s ease-in-out infinite;
}

.hero-showcase__card--3 {
  position: absolute;
  inset: 176px 10px 0 146px;
  z-index: 2;
  min-height: 194px;
  opacity: 0.96;
  transform: rotate(7deg) translateZ(0);
  animation: showcase-float-mid 6.8s ease-in-out infinite;
}

.home-page__section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.home-page__kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.home-page__title {
  margin: 0;
  font-size: 1.9rem;
  font-family: 'Noto Kufi Arabic', 'Cairo', Tahoma, Arial, sans-serif;
}

.home-page__summary {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.occasion-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.occasion-filter {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.occasion-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(46, 107, 203, 0.24);
  color: var(--accent-deep);
}

.occasion-filter.is-active {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 18px 28px rgba(20, 48, 94, 0.22);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.card-link {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card-link:hover {
  transform: translateY(-6px);
  border-color: rgba(46, 107, 203, 0.22);
  box-shadow: 0 28px 54px rgba(20, 48, 94, 0.18);
}

.card-link::after {
  content: '';
  position: absolute;
  inset: auto 14px 14px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(180deg, transparent, rgba(15, 47, 104, 0.42));
  opacity: 0;
  transition: opacity 220ms ease;
}

.card-link:hover::after {
  opacity: 1;
}

.card-link,
.hero-section__content,
.hero-showcase__panel,
.home-page__section-head,
.occasion-filters,
.detail-page__intro,
.detail-page__controls {
  animation: fade-up 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-showcase__panel {
  animation-delay: 120ms;
}

.home-page__section-head {
  animation-delay: 140ms;
}

.occasion-filters {
  animation-delay: 200ms;
}

.detail-page__controls {
  animation-delay: 120ms;
}

.card-link:nth-child(1) { animation-delay: 60ms; }
.card-link:nth-child(2) { animation-delay: 90ms; }
.card-link:nth-child(3) { animation-delay: 120ms; }
.card-link:nth-child(4) { animation-delay: 150ms; }
.card-link:nth-child(5) { animation-delay: 180ms; }
.card-link:nth-child(6) { animation-delay: 210ms; }
.card-link:nth-child(7) { animation-delay: 240ms; }
.card-link:nth-child(8) { animation-delay: 270ms; }

.hero-stat-card,
.hero-showcase__card {
  animation: soft-pop 460ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-stat-card:nth-child(1),
.hero-showcase__card--1 {
  animation-delay: 180ms;
}

.hero-stat-card:nth-child(2),
.hero-showcase__card--2 {
  animation-delay: 240ms;
}

.hero-stat-card:nth-child(3),
.hero-showcase__card--3 {
  animation-delay: 300ms;
}

.card-link__image {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
  border-radius: 26px;
}

.card-link.is-hidden {
  display: none;
}

.detail-page {
  padding: 42px 0 64px;
}

.detail-page__layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1fr);
  gap: 26px;
  align-items: start;
}

.detail-page__intro {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(230, 240, 255, 0.82));
  box-shadow: var(--shadow);
}

.detail-page__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(46, 107, 203, 0.14);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 700;
}

.detail-page__eyebrow,
.detail-page__panel-kicker,
.detail-page__related-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(46, 107, 203, 0.12);
}

.detail-page__title,
.detail-page__panel-title,
.detail-page__related-title {
  margin: 0;
  font-family: 'Noto Kufi Arabic', 'Cairo', Tahoma, Arial, sans-serif;
  color: var(--ink);
}

.detail-page__title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.45;
}

.detail-page__text,
.detail-page__panel-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.95;
}

.detail-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-page__badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(46, 107, 203, 0.1);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-page__related {
  display: grid;
  gap: 14px;
}

.detail-page__related-head {
  display: grid;
  gap: 10px;
}

.detail-page__related-title {
  font-size: 1.2rem;
}

.detail-page__related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-page__related-card {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 36px rgba(20, 48, 94, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.detail-page__related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px rgba(20, 48, 94, 0.16);
}

.detail-page__related-card img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.detail-page__controls {
  width: 100%;
  margin: 0;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 244, 255, 0.86));
  box-shadow: var(--shadow);
  position: sticky;
  top: 110px;
}

.detail-page__panel-head {
  display: grid;
  gap: 12px;
}

.choice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.choice-row:hover {
  border-color: rgba(46, 107, 203, 0.24);
  box-shadow: 0 12px 24px rgba(20, 48, 94, 0.08);
}

.choice-row:has(input:checked) {
  border-color: rgba(46, 107, 203, 0.34);
  background: linear-gradient(180deg, rgba(240, 246, 255, 0.98), rgba(224, 237, 255, 0.92));
}

.choice-row input {
  accent-color: var(--accent);
}

.name-input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 700;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.name-input::placeholder {
  color: #7a8db3;
}

.name-input:focus {
  border-color: rgba(46, 107, 203, 0.4);
  box-shadow: 0 0 0 5px rgba(46, 107, 203, 0.12);
  background: #fcfeff;
}

.download-panel {
  display: grid;
  gap: 16px;
}

.download-panel__canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid rgba(46, 107, 203, 0.12);
  background: #f7fbff;
  box-shadow: 0 18px 40px rgba(20, 48, 94, 0.12);
}

.download-panel__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 154px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  align-self: start;
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 30px rgba(20, 48, 94, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.download-panel__button:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
  box-shadow: 0 22px 34px rgba(15, 47, 104, 0.28);
}

@keyframes fade-up {
  from {
    opacity: 0.72;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes soft-pop {
  from {
    opacity: 0.78;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes showcase-float-main {
  0%, 100% {
    transform: rotate(-9deg) translate3d(0, 0, 0);
  }

  50% {
    transform: rotate(-7deg) translate3d(0, -10px, 0);
  }
}

@keyframes showcase-float-back {
  0%, 100% {
    transform: rotate(13deg) translate3d(0, 0, 0);
  }

  50% {
    transform: rotate(10deg) translate3d(0, 8px, 0);
  }
}

@keyframes showcase-float-mid {
  0%, 100% {
    transform: rotate(7deg) translate3d(0, 0, 0);
  }

  50% {
    transform: rotate(5deg) translate3d(-4px, -8px, 0);
  }
}

.site-footer {
  padding: 12px 0 32px;
}

.footer__inner {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.footer__copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-page {
  padding: 34px 0 56px;
}

.admin-login-page {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 34px 0 56px;
}

.admin-login-card {
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(228, 239, 255, 0.9));
  border: 1px solid rgba(46, 107, 203, 0.12);
  box-shadow: var(--shadow);
}

.admin-login-form {
  display: grid;
  gap: 14px;
}

.admin-hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding: 26px 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(225, 237, 255, 0.88));
  border: 1px solid rgba(46, 107, 203, 0.12);
  box-shadow: var(--shadow);
}

.admin-title {
  margin: 14px 0 10px;
  font-family: 'Noto Kufi Arabic', 'Cairo', Tahoma, Arial, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: var(--ink);
}

.admin-text {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
  line-height: 1.9;
}

.admin-notice {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.admin-notice--success {
  background: rgba(46, 203, 128, 0.12);
  color: #15603f;
}

.admin-notice--error {
  background: rgba(220, 59, 59, 0.12);
  color: #8b1f1f;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: start;
}

.admin-editor,
.admin-library {
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(46, 107, 203, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.admin-section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-section-head h2 {
  margin: 0;
  font-family: 'Noto Kufi Arabic', 'Cairo', Tahoma, Arial, sans-serif;
  color: var(--ink);
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field span {
  color: var(--muted);
  font-weight: 700;
}

.admin-field input,
.admin-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(46, 107, 203, 0.14);
  border-radius: 16px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
}

.admin-field--full {
  grid-column: 1 / -1;
}

.admin-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}

.admin-preview span {
  color: var(--muted);
  font-weight: 700;
}

.admin-preview img {
  width: min(220px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(46, 107, 203, 0.12);
  box-shadow: 0 16px 34px rgba(20, 48, 94, 0.12);
}

.admin-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-card-item {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(46, 107, 203, 0.1);
  background: rgba(248, 251, 255, 0.9);
}

.admin-card-item img {
  width: 100%;
  aspect-ratio: 3 / 4.15;
  object-fit: cover;
}

.admin-card-item__body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.admin-card-item__body h3,
.admin-card-item__body p {
  margin: 0;
}

.admin-card-item__body p {
  color: var(--muted);
}

.admin-card-item__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-delete-button {
  min-width: 96px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #8e2f45, #db5c6c);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

body[data-active-collection="work"] .detail-page__badge,
body[data-active-collection="work"] .hero-stat-card,
body[data-active-collection="work"] .hero-section__eyebrow {
  background: linear-gradient(180deg, rgba(236, 244, 255, 0.96), rgba(223, 236, 255, 0.88));
}

body[data-active-collection="personal"] .detail-page__badge,
body[data-active-collection="personal"] .hero-stat-card,
body[data-active-collection="personal"] .hero-section__eyebrow {
  background: linear-gradient(180deg, rgba(236, 244, 255, 0.96), rgba(223, 236, 255, 0.88));
}

@media (max-width: 1100px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-showcase__panel {
    width: 100%;
  }

  .hero-showcase__stack {
    min-height: 400px;
  }

  .hero-showcase__card--1 {
    inset: 44px 38px 0 18px;
  }

  .hero-showcase__card--2 {
    inset: 10px 14px auto 96px;
  }

  .hero-showcase__card--3 {
    inset: 168px 6px 0 120px;
  }

  .detail-page__layout {
    grid-template-columns: 1fr;
  }

  .detail-page__controls {
    position: static;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 20px, 100%);
  }

  .navbar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .navbar__logo {
    align-self: center;
  }

  .navbar__entities {
    justify-content: flex-start;
    gap: 10px;
  }

  .entity-link {
    width: 78px;
    height: 82px;
    border-radius: 18px;
  }

  .entity-link img {
    max-height: 34px;
  }

  .entity-link__label {
    font-size: 0.76rem;
  }

  .hero-section {
    padding: 22px;
    border-radius: 26px;
  }

  .hero-section__title {
    max-width: none;
  }

  .hero-section__actions,
  .home-page__section-head {
    display: grid;
    align-items: stretch;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-showcase__stack {
    min-height: 316px;
  }

  .hero-showcase__card {
    border-radius: 22px;
  }

  .hero-showcase__card--1 {
    inset: 48px 18px 0 16px;
    min-height: 222px;
    transform: rotate(-5deg);
  }

  .hero-showcase__card--2 {
    inset: 8px 22px auto 96px;
    min-height: 148px;
    transform: rotate(8deg);
  }

  .hero-showcase__card--3 {
    inset: 140px 8px 0 108px;
    min-height: 144px;
    transform: rotate(4deg);
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .detail-page {
    padding: 28px 0 48px;
  }

  .detail-page__intro,
  .detail-page__controls {
    padding: 20px;
    border-radius: 24px;
  }

  .admin-hero,
  .admin-layout,
  .admin-actions,
  .admin-hero__actions,
  .admin-card-item__actions,
  .admin-form {
    display: grid;
  }

  .admin-form,
  .admin-card-grid,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .detail-page__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-page__controls {
    width: 100%;
    padding: 18px;
    border-radius: 24px;
  }

  .download-panel__canvas,
  .card-link,
  .card-link__image {
    border-radius: 20px;
  }

  .choice-row,
  .name-input {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
