/* =========================================================
   Romantic Cards / بطاقات رومنسية — theme stylesheet
   Modern 2026 romantic palette: blush rose -> deep burgundy,
   warm gold accent, soft ivory background, glassmorphism cards.
   ========================================================= */

:root {
  --rc-rose-50: #fff5f7;
  --rc-rose-100: #ffe4ec;
  --rc-rose-300: #ff9dbd;
  --rc-rose-500: #ff6b9d;
  --rc-rose-600: #e8467f;
  --rc-primary: #c2185b;
  --rc-primary-dark: #6a1b4d;
  --rc-gold: #e0ab4f;
  --rc-gold-light: #ffe9c7;
  --rc-ink: #351b30;
  --rc-ink-soft: #6d5568;
  --rc-bg: #fffaf7;
  --rc-surface: #ffffff;
  --rc-border: #f3dde6;
  --rc-shadow: 0 10px 30px -12px rgba(106, 27, 77, 0.25);
  --rc-shadow-lg: 0 20px 45px -18px rgba(106, 27, 77, 0.35);
  --rc-radius: 20px;
  --rc-radius-sm: 12px;
  --rc-gradient-hero: linear-gradient(135deg, #ff9dbd 0%, #c2185b 55%, #6a1b4d 100%);
  --rc-gradient-badge: linear-gradient(135deg, #ff7aa8 0%, #c2185b 55%, #6a1b4d 100%);
  --font-ar: 'Cairo', 'Tahoma', sans-serif;
  --font-en-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-en-body: 'Inter', 'Segoe UI', sans-serif;
}

html[dir="rtl"] body { font-family: var(--font-ar); }
html[dir="ltr"] body { font-family: var(--font-en-body); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] .brand-word {
  font-family: var(--font-ar);
  font-weight: 800;
}
html[dir="ltr"] h1, html[dir="ltr"] h2, html[dir="ltr"] h3, html[dir="ltr"] h4, html[dir="ltr"] .brand-word {
  font-family: var(--font-en-heading);
  font-weight: 700;
}

* { box-sizing: border-box; }

body {
  background: var(--rc-bg);
  color: var(--rc-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: var(--rc-primary); text-decoration: none; }
a:hover { color: var(--rc-primary-dark); }

/* ---------- Header ---------- */
.rc-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rc-border);
}

.rc-header .container-fluid {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: .65rem;
  padding-bottom: .65rem;
}

.rc-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 1.25rem;
  color: var(--rc-ink);
}

.rc-brand img { width: 42px; height: 42px; filter: drop-shadow(0 4px 10px rgba(194, 24, 91, .35)); }
.rc-brand .brand-word { line-height: 1.1; }
.rc-brand .brand-word small { display: block; font-size: .68rem; font-weight: 500; color: var(--rc-ink-soft); letter-spacing: .04em; }

.rc-menu-toggle {
  border: none;
  background: var(--rc-gradient-badge);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--rc-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rc-menu-toggle:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--rc-shadow-lg); }
.rc-menu-toggle svg { width: 20px; height: 20px; }

.rc-search {
  flex: 1 1 auto;
  max-width: 520px;
  margin-inline: auto;
}
.rc-search form { position: relative; }
.rc-search input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--rc-border);
  background: var(--rc-surface);
  padding: .6rem 1.1rem;
  padding-inline-start: 2.6rem;
  font-size: .95rem;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.rc-search input:focus {
  outline: none;
  border-color: var(--rc-rose-500);
  box-shadow: 0 0 0 4px rgba(255, 107, 157, .18);
}
.rc-search .search-icon {
  position: absolute;
  inset-inline-start: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rc-ink-soft);
  width: 18px;
  height: 18px;
}

.rc-lang-switch {
  display: flex;
  border: 1px solid var(--rc-border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--rc-surface);
}
.rc-lang-switch a {
  padding: .45rem .9rem;
  font-weight: 700;
  font-size: .85rem;
  color: var(--rc-ink-soft);
}
.rc-lang-switch a.active {
  background: var(--rc-gradient-badge);
  color: #fff;
}

/* ---------- Sidebar (collapsible categories menu) ---------- */
.rc-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(53, 27, 48, .35);
  backdrop-filter: blur(2px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.rc-sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

.rc-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: 300px;
  max-width: 85vw;
  background: var(--rc-surface);
  z-index: 1050;
  box-shadow: var(--rc-shadow-lg);
  transform: translateX(-105%);
  transition: transform .3s cubic-bezier(.22, .9, .28, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
html[dir="rtl"] .rc-sidebar { transform: translateX(105%); }
.rc-sidebar.show,
html[dir="rtl"] .rc-sidebar.show { transform: translateX(0); }

.rc-sidebar-header {
  background: var(--rc-gradient-hero);
  color: #fff;
  padding: 1.4rem 1.25rem;
}
.rc-sidebar-header h5 { margin: 0; font-weight: 800; }
.rc-sidebar-header p { margin: .2rem 0 0; opacity: .85; font-size: .85rem; }

.rc-category-list { list-style: none; margin: 0; padding: .75rem; }
.rc-category-list li + li { margin-top: .35rem; }
.rc-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .7rem .9rem;
  border-radius: var(--rc-radius-sm);
  color: var(--rc-ink);
  font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.rc-category-list a:hover { background: var(--rc-rose-100); transform: translateX(2px); }
html[dir="rtl"] .rc-category-list a:hover { transform: translateX(-2px); }
.rc-category-list a.active { background: var(--rc-gradient-badge); color: #fff; }
.rc-category-list .badge-count {
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  padding: .1rem .55rem;
  font-size: .75rem;
  font-weight: 700;
}
.rc-category-list a.active .badge-count { background: rgba(255,255,255,.25); color: #fff; }

.rc-sidebar-close {
  position: absolute;
  inset-inline-end: .9rem;
  top: 1rem;
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}

/* ---------- Hero ---------- */
.rc-hero {
  background: var(--rc-gradient-hero);
  color: #fff;
  padding: 3.2rem 0 4.2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: -2.5rem;
}
.rc-hero::before, .rc-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.rc-hero::before { width: 260px; height: 260px; top: -120px; inset-inline-end: -60px; }
.rc-hero::after { width: 180px; height: 180px; bottom: -90px; inset-inline-start: 8%; }
.rc-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: .5rem; }
.rc-hero p { opacity: .92; max-width: 640px; }

/* ---------- Card grid ---------- */
.rc-card {
  background: var(--rc-surface);
  border-radius: var(--rc-radius);
  overflow: hidden;
  box-shadow: var(--rc-shadow);
  border: 1px solid var(--rc-border);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .35s cubic-bezier(.22,.9,.28,1), box-shadow .35s ease;
  opacity: 0;
  transform: translateY(24px);
  animation: rcFadeUp .6s ease forwards;
}
@keyframes rcFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.rc-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--rc-shadow-lg);
}
.rc-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, var(--rc-rose-100), #fff);
}
.rc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.rc-card:hover .rc-card-media img { transform: scale(1.07); }
.rc-card-media .rc-card-category {
  position: absolute;
  top: .7rem;
  inset-inline-start: .7rem;
  background: rgba(255,255,255,.9);
  color: var(--rc-primary-dark);
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.rc-card-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.rc-card-title { font-weight: 800; font-size: 1.02rem; margin: 0; }
.rc-card-desc { color: var(--rc-ink-soft); font-size: .86rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-card-actions { margin-top: auto; display: flex; gap: .5rem; padding-top: .6rem; }

.rc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font-weight: 700;
  font-size: .88rem;
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.rc-btn svg { width: 16px; height: 16px; }
.rc-btn-primary { background: var(--rc-gradient-badge); color: #fff; box-shadow: var(--rc-shadow); }
.rc-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--rc-shadow-lg); color: #fff; }
.rc-btn-outline { background: #fff; color: var(--rc-primary); border: 1.5px solid var(--rc-rose-300); }
.rc-btn-outline:hover { background: var(--rc-rose-50); color: var(--rc-primary-dark); }
.rc-btn-block { width: 100%; }
.rc-btn-sm { padding: .4rem .8rem; font-size: .8rem; }
.rc-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---------- Pagination ---------- */
.rc-pagination { display: flex; justify-content: center; gap: .4rem; margin: 2.5rem 0; flex-wrap: wrap; }
.rc-pagination a, .rc-pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  color: var(--rc-ink);
  background: var(--rc-surface);
  border: 1px solid var(--rc-border);
  padding: 0 .5rem;
}
.rc-pagination a:hover { background: var(--rc-rose-100); color: var(--rc-primary-dark); }
.rc-pagination .active { background: var(--rc-gradient-badge); color: #fff; border-color: transparent; }
.rc-pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------- Empty state ---------- */
.rc-empty { text-align: center; padding: 4rem 1rem; color: var(--rc-ink-soft); }
.rc-empty svg { width: 64px; height: 64px; color: var(--rc-rose-300); margin-bottom: 1rem; }

/* ---------- Card detail / signature modal ---------- */
.rc-modal .modal-content {
  border-radius: 22px;
  border: none;
  overflow: hidden;
  box-shadow: var(--rc-shadow-lg);
}
.rc-modal .modal-header {
  background: var(--rc-gradient-hero);
  color: #fff;
  border: none;
}
.rc-modal .modal-header .btn-close { filter: brightness(0) invert(1); }
.rc-sign-tabs .nav-link {
  border-radius: 999px;
  font-weight: 700;
  color: var(--rc-ink-soft);
  padding: .45rem 1.1rem;
}
.rc-sign-tabs .nav-link.active { background: var(--rc-gradient-badge); color: #fff; }
.rc-sign-stage {
  position: relative;
  background: repeating-conic-gradient(#f6eef1 0% 25%, #fff 0% 50%) 50% / 22px 22px;
  border-radius: var(--rc-radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.rc-sign-stage canvas { max-width: 100%; touch-action: none; cursor: crosshair; }
.rc-color-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--rc-border);
  cursor: pointer;
}
.rc-color-swatch.active { box-shadow: 0 0 0 2px var(--rc-primary); }
.rc-share-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.rc-share-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  transition: transform .2s ease;
}
.rc-share-btn:hover { transform: translateY(-3px); color: #fff; }
.rc-share-btn.whatsapp { background: #25d366; }
.rc-share-btn.telegram { background: #29a9eb; }
.rc-share-btn.twitter { background: #111827; }
.rc-share-btn.facebook { background: #1877f2; }
.rc-share-btn.snapchat { background: #fffc00; color: #111; }
.rc-share-btn.copy { background: var(--rc-ink-soft); }

/* ---------- Admin ---------- */
.rc-admin-shell { min-height: 100vh; display: flex; background: var(--rc-bg); }
.rc-admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--rc-primary-dark);
  color: #fff;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.rc-admin-sidebar .brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.rc-admin-sidebar .brand img { width: 38px; height: 38px; }
.rc-admin-sidebar a {
  color: rgba(255,255,255,.82);
  padding: .7rem .9rem;
  border-radius: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.rc-admin-sidebar a:hover { background: rgba(255,255,255,.08); color: #fff; }
.rc-admin-sidebar a.active { background: var(--rc-gradient-badge); color: #fff; }
.rc-admin-main { flex: 1; padding: 2rem; max-width: 100%; overflow-x: hidden; }
.rc-admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }

.rc-stat-card {
  background: var(--rc-surface);
  border-radius: var(--rc-radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--rc-shadow);
  border: 1px solid var(--rc-border);
}
.rc-stat-card .value { font-size: 1.9rem; font-weight: 800; color: var(--rc-primary-dark); }
.rc-stat-card .label { color: var(--rc-ink-soft); font-weight: 600; font-size: .85rem; }

.rc-panel {
  background: var(--rc-surface);
  border-radius: var(--rc-radius);
  border: 1px solid var(--rc-border);
  box-shadow: var(--rc-shadow);
  padding: 1.5rem;
}

.rc-table thead th { border: none; color: var(--rc-ink-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.rc-table tbody tr { background: #fff; }
.rc-table tbody td { vertical-align: middle; border-color: var(--rc-border); }
.rc-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }

.rc-form-control, .form-control, .form-select {
  border-radius: var(--rc-radius-sm);
  border: 1px solid var(--rc-border);
  padding: .6rem .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rc-rose-500);
  box-shadow: 0 0 0 4px rgba(255,107,157,.15);
}
.form-label { font-weight: 700; font-size: .88rem; color: var(--rc-ink); }

.rc-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rc-gradient-hero);
  padding: 1.5rem;
}
.rc-login-card {
  background: #fff;
  border-radius: 26px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--rc-shadow-lg);
  text-align: center;
}
.rc-login-card img { width: 64px; margin-bottom: 1rem; }

/* ---------- Footer ---------- */
.rc-footer {
  background: var(--rc-primary-dark);
  color: rgba(255,255,255,.85);
  padding: 1.4rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: .9rem;
}
.rc-footer a { color: #fff; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .rc-admin-shell { flex-direction: column; }
  .rc-admin-sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .rc-admin-sidebar .brand { margin-bottom: 0; }
}
@media (max-width: 767.98px) {
  .rc-hero h1 { font-size: 1.6rem; }
  .rc-search { order: 3; max-width: 100%; margin-inline: 0; flex-basis: 100%; }
}
