/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text-primary: #e8e8ed;
  --text-secondary: #9d9daa;
  --text-muted: #6b6b78;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-dark: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --border: #1e1e2a;
  --border-light: #2a2a38;
  --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #6366f1, #06b6d4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ku: "Noto Sans Arabic", "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.theme-space {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(85% 70% at 50% 40%, rgba(44, 40, 122, 0.22), rgba(2, 3, 18, 0) 70%),
    linear-gradient(180deg, #04051e 0%, #020313 56%, #01020d 100%);
  background-attachment: fixed;
}

body.theme-space::before,
body.theme-space::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  will-change: transform, opacity;
  contain: strict;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

body.theme-space::before {
  z-index: -2;
  background-image:
    radial-gradient(6.5px 6.5px at  7%  9%, rgba(255,255,255,0.96), transparent 70%),
    radial-gradient(8px 8px at 23% 34%, rgba(220,232,255,0.92), transparent 70%),
    radial-gradient(5px 5px at 41% 17%, rgba(255,255,255,0.93), transparent 70%),
    radial-gradient(6.5px 6.5px at 58% 71%, rgba(210,226,255,0.88), transparent 70%),
    radial-gradient(5px 5px at 74% 44%, rgba(255,255,255,0.96), transparent 70%),
    radial-gradient(8px 8px at 91% 82%, rgba(230,241,255,0.86), transparent 70%),
    radial-gradient(5px 5px at 16% 56%, rgba(255,255,255,0.91), transparent 70%),
    radial-gradient(6.5px 6.5px at 35% 88%, rgba(215,229,255,0.88), transparent 70%),
    radial-gradient(5px 5px at 49% 63%, rgba(255,255,255,0.94), transparent 70%),
    radial-gradient(8px 8px at 63% 28%, rgba(240,245,255,0.91), transparent 70%),
    radial-gradient(5px 5px at 82% 11%, rgba(255,255,255,0.89), transparent 70%),
    radial-gradient(6.5px 6.5px at  5% 75%, rgba(225,236,255,0.93), transparent 70%),
    radial-gradient(5px 5px at 29% 47%, rgba(255,255,255,0.87), transparent 70%),
    radial-gradient(8px 8px at 51% 92%, rgba(200,219,255,0.91), transparent 70%),
    radial-gradient(5px 5px at 68% 55%, rgba(255,255,255,0.95), transparent 70%),
    radial-gradient(6.5px 6.5px at 87% 33%, rgba(235,243,255,0.89), transparent 70%),
    radial-gradient(5px 5px at 13% 21%, rgba(255,255,255,0.92), transparent 70%),
    radial-gradient(8px 8px at 44% 77%, rgba(212,227,255,0.88), transparent 70%),
    radial-gradient(5px 5px at 77%  6%, rgba(255,255,255,0.96), transparent 70%),
    radial-gradient(6.5px 6.5px at 96% 59%, rgba(228,239,255,0.90), transparent 70%),
    radial-gradient(5px 5px at 19% 83%, rgba(255,255,255,0.89), transparent 70%),
    radial-gradient(8px 8px at 37% 12%, rgba(205,223,255,0.93), transparent 70%),
    radial-gradient(5px 5px at 60% 39%, rgba(255,255,255,0.91), transparent 70%),
    radial-gradient(6.5px 6.5px at 71% 68%, rgba(232,242,255,0.87), transparent 70%),
    radial-gradient(5px 5px at 88% 24%, rgba(255,255,255,0.94), transparent 70%),
    radial-gradient(8px 8px at  3% 42%, rgba(218,232,255,0.89), transparent 70%),
    radial-gradient(5px 5px at 47% 53%, rgba(255,255,255,0.88), transparent 70%),
    radial-gradient(6.5px 6.5px at 79% 90%, rgba(225,238,255,0.92), transparent 70%),
    radial-gradient(5px 5px at 55%  8%, rgba(255,255,255,0.90), transparent 70%),
    radial-gradient(8px 8px at 94% 46%, rgba(208,225,255,0.94), transparent 70%);
  background-size: 800px 800px;
  background-repeat: repeat;
  -webkit-animation: spaceDriftA 85s linear infinite, spaceTwinkleA 6s ease-in-out infinite alternate;
          animation: spaceDriftA 85s linear infinite, spaceTwinkleA 6s ease-in-out infinite alternate;
}

body.theme-space::after {
  z-index: -1;
  background-image:
    radial-gradient(4.5px 4.5px at  4% 13%, rgba(255,255,255,0.90), transparent 68%),
    radial-gradient(3px   3px   at 12% 38%, rgba(236,244,255,0.82), transparent 68%),
    radial-gradient(4.5px 4.5px at 21% 67%, rgba(255,255,255,0.85), transparent 68%),
    radial-gradient(3px   3px   at 31% 22%, rgba(228,239,255,0.78), transparent 68%),
    radial-gradient(4.5px 4.5px at 39% 84%, rgba(255,255,255,0.88), transparent 68%),
    radial-gradient(3px   3px   at 48% 51%, rgba(240,247,255,0.80), transparent 68%),
    radial-gradient(4.5px 4.5px at 57%  8%, rgba(255,255,255,0.87), transparent 68%),
    radial-gradient(3px   3px   at 66% 43%, rgba(232,242,255,0.76), transparent 68%),
    radial-gradient(4.5px 4.5px at 75% 73%, rgba(255,255,255,0.89), transparent 68%),
    radial-gradient(3px   3px   at 84% 29%, rgba(225,238,255,0.81), transparent 68%),
    radial-gradient(4.5px 4.5px at 93% 61%, rgba(255,255,255,0.84), transparent 68%),
    radial-gradient(3px   3px   at  8% 88%, rgba(238,246,255,0.77), transparent 68%),
    radial-gradient(4.5px 4.5px at 17% 44%, rgba(255,255,255,0.86), transparent 68%),
    radial-gradient(3px   3px   at 26% 71%, rgba(230,241,255,0.79), transparent 68%),
    radial-gradient(4.5px 4.5px at 36% 15%, rgba(255,255,255,0.91), transparent 68%),
    radial-gradient(3px   3px   at 45% 93%, rgba(222,236,255,0.75), transparent 68%),
    radial-gradient(4.5px 4.5px at 54% 37%, rgba(255,255,255,0.83), transparent 68%),
    radial-gradient(3px   3px   at 63% 18%, rgba(234,243,255,0.78), transparent 68%),
    radial-gradient(4.5px 4.5px at 72% 55%, rgba(255,255,255,0.88), transparent 68%),
    radial-gradient(3px   3px   at 81% 82%, rgba(226,239,255,0.80), transparent 68%),
    radial-gradient(4.5px 4.5px at 90%  7%, rgba(255,255,255,0.85), transparent 68%),
    radial-gradient(3px   3px   at  2% 59%, rgba(241,248,255,0.76), transparent 68%),
    radial-gradient(4.5px 4.5px at 11% 27%, rgba(255,255,255,0.89), transparent 68%),
    radial-gradient(3px   3px   at 20% 96%, rgba(229,241,255,0.77), transparent 68%),
    radial-gradient(4.5px 4.5px at 29% 48%, rgba(255,255,255,0.84), transparent 68%),
    radial-gradient(3px   3px   at 40% 31%, rgba(235,244,255,0.79), transparent 68%),
    radial-gradient(4.5px 4.5px at 52% 76%, rgba(255,255,255,0.87), transparent 68%),
    radial-gradient(3px   3px   at 61% 14%, rgba(227,240,255,0.81), transparent 68%),
    radial-gradient(4.5px 4.5px at 70% 89%, rgba(255,255,255,0.90), transparent 68%),
    radial-gradient(3px   3px   at 78% 34%, rgba(233,243,255,0.76), transparent 68%),
    radial-gradient(4.5px 4.5px at 87% 68%, rgba(255,255,255,0.86), transparent 68%),
    radial-gradient(3px   3px   at 95% 24%, rgba(220,235,255,0.80), transparent 68%),
    radial-gradient(4.5px 4.5px at  6% 52%, rgba(255,255,255,0.83), transparent 68%),
    radial-gradient(3px   3px   at 43%  6%, rgba(237,245,255,0.78), transparent 68%),
    radial-gradient(4.5px 4.5px at 85% 45%, rgba(255,255,255,0.91), transparent 68%);
  background-size: 550px 550px;
  background-repeat: repeat;
  -webkit-animation: spaceDriftB 65s linear infinite, spaceTwinkleB 3.5s ease-in-out infinite alternate;
          animation: spaceDriftB 65s linear infinite, spaceTwinkleB 3.5s ease-in-out infinite alternate;
}

body.theme-space .section-alt {
  background: transparent;
}

/* Keep the space theme clean: remove legacy hero blobs and boost readability */
body.theme-space .hero-bg-shapes {
  display: none;
}

body.theme-space .hero {
  background: transparent;
}

body.theme-space .hero-subtitle {
  color: rgba(219, 226, 255, 0.7);
}

body.theme-space .hero-desc {
  color: rgba(220, 228, 255, 0.78);
}

body.theme-space .stat-label {
  color: rgba(212, 220, 255, 0.62);
}

@-webkit-keyframes spaceDriftA {
  from { background-position: 0 0; }
  to   { background-position: -160px 200px; }
}
@keyframes spaceDriftA {
  from { background-position: 0 0; }
  to   { background-position: -160px 200px; }
}

@-webkit-keyframes spaceDriftB {
  from { background-position: 0 0; }
  to   { background-position: 200px -160px; }
}
@keyframes spaceDriftB {
  from { background-position: 0 0; }
  to   { background-position: 200px -160px; }
}

@-webkit-keyframes spaceTwinkleA {
  0%   { opacity: 0.35; }
  40%  { opacity: 1; }
  65%  { opacity: 0.6; }
  100% { opacity: 1; }
}
@keyframes spaceTwinkleA {
  0%   { opacity: 0.35; }
  40%  { opacity: 1; }
  65%  { opacity: 0.6; }
  100% { opacity: 1; }
}

@-webkit-keyframes spaceTwinkleB {
  0%   { opacity: 0.2; }
  30%  { opacity: 0.9; }
  55%  { opacity: 0.45; }
  80%  { opacity: 1; }
  100% { opacity: 0.3; }
}
@keyframes spaceTwinkleB {
  0%   { opacity: 0.2; }
  30%  { opacity: 0.9; }
  55%  { opacity: 0.45; }
  80%  { opacity: 1; }
  100% { opacity: 0.3; }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* =============================================
   LAMP LOGIN MODAL
   ============================================= */

/* Reuse existing .modal-overlay backdrop but lay out lamp + card side by side */
#loginModal {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#loginModal.hidden {
  display: none;
}

/* Invisible full-area click-to-close backdrop */
.lamp-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  cursor: pointer;
}

.lamp-modal-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5vmin;
  flex-wrap: wrap;
  width: 100%;
  max-width: 780px;
  padding: 24px;
}

/* ── Lamp ── */
.lamp-wrapper {
  position: relative;
  width: 220px;
  height: 320px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 0px rgba(255, 214, 110, 0));
  transition: filter 0.5s ease;
}

.lamp-wrapper.lamp-on {
  filter: drop-shadow(0 0 40px rgba(255, 214, 110, 0.55));
}

.lamp-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lamp-shade-path {
  fill: #e8e2d9;
  transition: fill 0.5s ease, filter 0.5s ease;
}

.lamp-wrapper.lamp-on .lamp-shade-path {
  fill: #fff9e6;
  filter: drop-shadow(0 0 18px rgba(255, 240, 160, 0.7));
}

.lamp-base-rect {
  fill: #d1ccc2;
}

.lamp-inner-glow {
  fill: #ffdb8a;
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: blur(12px);
}

.lamp-wrapper.lamp-on .lamp-inner-glow {
  opacity: 0.65;
}

.lamp-cord-line {
  stroke: #666;
  stroke-width: 2;
}

.lamp-cord-bead {
  fill: var(--accent);
  cursor: pointer;
}

.lamp-cord-hit {
  cursor: pointer;
}
/* xZ8+x9MNwkmOU7w/zGjHLjo6d0k4NG1jZnBFelQvY1RnOEZET2k1aW1uOHdodm42SFoydm9hTU4yemhaOFpZcUNBS0tGbks5TE54WmpRY0lUcWxCUUJpT1h1N2NKa0RJVmtIVk1ZYWc9PQ== */
/* ── Auth card ── */
.lamp-auth-card {
  position: relative;
  width: 320px;
  background: rgba(22, 22, 31, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lamp-auth-card.lamp-card-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.lamp-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.lamp-auth-close:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

html[dir="rtl"] .lamp-auth-close {
  right: auto;
  left: 14px;
}

.lamp-auth-header {
  text-align: center;
  margin-bottom: 18px;
}

.lamp-auth-header svg {
  color: var(--accent-light);
  margin-bottom: 6px;
}

.lamp-auth-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.lamp-auth-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Lamp Sign-In Button — always golden ── */
.lamp-signin-btn {
  background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fcf6ba, #aa771c) !important;
  color: #1a1200 !important;
  box-shadow: 0 4px 18px rgba(180, 140, 30, 0.35) !important;
  text-shadow: 0 1px 2px rgba(255, 240, 150, 0.4);
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
}

.lamp-signin-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 24px rgba(180, 140, 30, 0.5) !important;
}

.lamp-signin-btn:active {
  transform: scale(0.98) !important;
  filter: brightness(0.97);
}

/* Warm glow tint on sign-in button when lamp is on */
.lamp-on-glow .lamp-signin-btn {
  box-shadow: 0 4px 26px rgba(255, 200, 60, 0.5) !important;
}

/* Page-level warm glow overlay */
#loginModal.lamp-on-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 38% 50%, rgba(255, 210, 100, 0.08), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Portal Switcher (Staff / Customer) ── */
.lamp-portal-switch {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lamp-portal-btn {
  flex: 1;
  padding: 9px 0;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.2px;
}

.lamp-portal-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.lamp-portal-btn.active {
  background: var(--gradient-1);
  color: #fff;
}

/* Customer badge colour overrides */
.user-badge.customer-badge {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .lamp-modal-inner {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .lamp-wrapper {
    width: 160px;
    height: 230px;
  }

  .lamp-auth-card {
    width: 100%;
    max-width: 340px;
    padding: 24px 18px 20px;
  }
}

/* ===== Credit Card Section ===== */
.card-section {
  background: linear-gradient(180deg, #5b2bd7 0%, #5e2bd9 40%, transparent 100%);
  padding: 60px 0 80px;
}
.card-area {
  display: flex;
  gap: 36px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px;
}
.credit-card {
  width: 360px;
  height: 220px;
  border-radius: 14px;
  perspective: 1200px;
}
.credit-card > .card-front,
.credit-card > .card-back {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, #111214 0%, #1f1530 60%);
  color: #fff;
  box-shadow: 0 24px 48px rgba(12,8,30,0.55), 0 6px 18px rgba(99,102,241,0.08);
  padding: 20px 22px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  position: relative;
}
.credit-card .card-front {
  transform: rotateY(0deg);
}
.credit-card .card-back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg,#111018,#0b0b10);
}
.credit-card.flipped .card-front { transform: rotateY(-180deg); }
.credit-card.flipped .card-back  { transform: rotateY(0deg); }

.card-brand { font-size: 0.95rem; opacity: 0.85; }
.card-chip { width: 48px; height: 36px; background: linear-gradient(90deg,#ffd966,#ff8a00); border-radius:6px; margin:18px 0; box-shadow: inset 0 -4px 8px rgba(0,0,0,0.2); }
.card-number { font-family: monospace; font-size: 1.25rem; letter-spacing: 2px; margin-top: 6px; }
.card-row { display:flex; justify-content:space-between; align-items:flex-end; margin-top:24px; }
.card-holder .label, .card-exp .label { font-size:0.65rem; color: rgba(255,255,255,0.6); }
.card-holder div, .card-exp div { font-weight:700; margin-top:6px; }

.card-back .magnetic-strip { height: 44px; background:#111; margin-top:14px; border-radius:4px; }
.sig-row { display:flex; justify-content:space-between; align-items:center; margin-top:18px; }
.sig-box { flex:1; height:34px; background:linear-gradient(90deg,#fff,#f5f5f5); margin-right:12px; border-radius:4px; }
.cvv { width:64px; text-align:center; font-weight:700; background:#e9e9e9; color:#111; padding:6px 8px; border-radius:4px; }

.card-form { width:420px; max-width:92%; background: rgba(255,255,255,0.04); padding:18px; border-radius:12px; border:1px solid rgba(255,255,255,0.05); }
.card-form .form-group { margin-bottom:12px; }
.card-form label { display:block; font-size:0.78rem; color:var(--text-secondary); margin-bottom:6px; }
.card-form input, .card-form select { width:100%; padding:10px 12px; border-radius:8px; border:1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.25); color: #fff; }
.form-row { display:flex; gap:12px; }
.form-group.small { flex:1; }

@media (max-width: 880px) {
  .card-area { flex-direction:column-reverse; }
  .credit-card { transform: scale(0.95); }
}


/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 140px 0 24px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo span {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px;
}

.nav-links li:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.nav-link.active {
  color: var(--accent-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  -webkit-transform: rotate(45deg) translate(5px, 5px);
          transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  -webkit-transform: rotate(-45deg) translate(5px, -5px);
          transform: rotate(-45deg) translate(5px, -5px);
}

.lang-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 110px;
  height: 40px;
  padding: 0;
  background: rgba(22, 22, 31, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--accent-light);
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font), var(--font-ku);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
  line-height: 40px;
  box-sizing: border-box;
  overflow: hidden;
}

.lang-toggle .lang-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lang-label {
  display: inline-block;
  font-family: var(--font), var(--font-ku);
  font-size: 0.84rem;
  line-height: 1;
  vertical-align: middle;
}

.lang-toggle:hover {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
}

html[dir="rtl"] .lang-toggle {
  right: auto;
  left: 16px;
}

html[dir="rtl"] .nav-container {
  padding: 0 24px 0 140px;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  max-height: 1000px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-bg-shapes {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -200px;
  right: -200px;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: #8b5cf6;
  bottom: -100px;
  left: -100px;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: #06b6d4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.4rem; /* fallback for browsers without clamp() */
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.highlight {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  max-width: 620px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 8px;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  -webkit-transform: translateY(-2px);
          transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.8rem; /* fallback for browsers without clamp() */
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -0.5px;
}

/* =============================================
   SERVICES
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.services-orbit-wrap {
  position: relative;
  display: block;
  padding: 60px 0 40px;
}

.services-orbit {
  position: relative;
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  opacity: 1;
  max-height: none;
  overflow: visible;
  transition: none;
}

.services-orbit-wrap.is-open .services-orbit {
  opacity: 1;
  max-height: none;
}

.services-orbit .card {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  transition-delay: 0ms;
  min-height: 220px;
  padding: 18px 16px;
}

.services-orbit .card-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
}

.services-orbit .card-title {
  font-size: 1rem;
  margin-bottom: 8px;
}

.services-orbit .card-desc {
  font-size: 0.9rem;
  line-height: 1.45;
  display: block;
  line-clamp: unset;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
  overflow: visible;
}

.services-orbit-wrap.is-open .services-orbit .card {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.card {
  background: linear-gradient(165deg, rgb(29, 31, 44) 0%, rgb(22, 24, 38) 55%, rgb(18, 20, 32) 100%);
  border: 1px solid rgb(37, 41, 59);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  position: relative;
  overflow: hidden;
  cursor: default;
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  will-change: transform, box-shadow;
}
.card:hover::after {
  opacity: 1;
  transform: scale(1.02);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.25);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #7b86ff;
  transition: background 0.24s ease, border-color 0.24s ease;
}

.card:hover .card-icon {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(129, 140, 248, 0.25);
}

/* =============================================
   SERVICES ORBIT — Laptop / mid-range screens
   Reduce orbit radius on 981px–1280px screens to
   prevent cards from overflowing or overlapping.
   ============================================= */
@media (min-width: 981px) and (max-width: 1280px) {
  .services-orbit-wrap.is-open {
    min-height: auto;
  }
}

@media (max-width: 740px) {
  .services-orbit-wrap {
    padding: 24px 0;
  }

  .services-orbit {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    opacity: 1;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
  }

  .services-orbit .card {
    width: 100%;
  }
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =============================================
   PORTFOLIO
   ============================================= */
.portfolio-grid {
  display: -ms-grid;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* simplified from minmax(min(340px,100%),1fr) */
  gap: 24px;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.card-delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s, background .2s;
}

.portfolio-card:hover .card-delete-btn {
  opacity: 1;
}

.card-delete-btn:hover {
  background: rgba(220, 38, 38, 1);
}

html[dir="rtl"] .card-delete-btn {
  right: auto;
  left: 10px;
}

.portfolio-img {
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.portfolio-img img,
.portfolio-img video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-img video {
  cursor: pointer;
}

.portfolio-overlay {
  position: relative;
  z-index: 2;
}

.portfolio-tag {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.portfolio-info {
  padding: 24px;
}

.portfolio-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.portfolio-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.about-values {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.value {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.value-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.value-icon svg {
  width: 20px;
  height: 20px;
}

.value strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.value p {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
}

.about-skills h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.skill {
  margin-bottom: 22px;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 500;
}

.skill-header span:last-child {
  color: var(--accent-light);
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background: var(--bg-primary);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-1);
  border-radius: 10px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   CONTACT
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-info > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.contact-item svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--accent-light);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 2px;
  flex-wrap: wrap;
  width: max-content;
}

.social-link {
  --chip-active: #0a66c2;
  --chip-shadow: rgba(10, 102, 194, 0.38);
  position: relative;
  min-width: 128px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fefefe 0%, #eef1f6 100%);
  border: 1px solid #d1d7e3;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: #2c3748;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 5px 0 #9aa3b3, 0 14px 20px rgba(2, 10, 24, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transform: translateY(0);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.social-link:hover {
  transform: translateY(-1px);
  border-color: #c3ccdc;
  box-shadow: 0 6px 0 #9aa3b3, 0 16px 22px rgba(2, 10, 24, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.social-link svg {
  width: 17px;
  height: 17px;
}

.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7ecf5;
  color: #5b6679;
}

.social-text {
  line-height: 1;
  letter-spacing: 0.1px;
}

/* Fallback for browsers that don't support color-mix() (pre-Chrome 111, pre-Firefox 113, pre-Safari 16.2) */
.social-link.is-active {
  background: linear-gradient(180deg, #2c7bca 0%, #0a66c2 100%);
  border-color: #0a55a2;
  color: #ffffff;
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
  box-shadow: 0 5px 0 #0a4079, 0 18px 26px rgba(10, 102, 194, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

/* Enhanced styles for browsers with color-mix() support */
@supports (background: color-mix(in srgb, red, blue)) {
  .social-link.is-active {
    background: linear-gradient(180deg, color-mix(in srgb, var(--chip-active), #ffffff 14%) 0%, var(--chip-active) 100%);
    border-color: color-mix(in srgb, var(--chip-active), #0b1220 20%);
    box-shadow: 0 5px 0 color-mix(in srgb, var(--chip-active), #0b1220 45%), 0 18px 26px var(--chip-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  }
}

.social-link.is-active .social-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.social-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35), 0 5px 0 #9aa3b3, 0 14px 20px rgba(2, 10, 24, 0.24);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.92rem;
  font-family: var(--font);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 24px;
}

.form-status.success {
  color: #10b981;
}

.form-status.error {
  color: #ef4444;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-size: 1.2rem;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-light);
}

/* =============================================
   UTILITY
   ============================================= */
.hidden {
  display: none !important;
}

/* =============================================
   NAV LOGIN BUTTON
   ============================================= */
.nav-login-btn {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-login-btn:hover {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
}

.nav-logout-btn {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
}

.nav-logout-btn:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border-color: transparent;
}

/* Logged-in indicator */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  margin-right: 8px;
}

.user-badge svg {
  width: 14px;
  height: 14px;
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  -webkit-animation: modalFadeIn 0.25s ease forwards;
          animation: modalFadeIn 0.25s ease forwards;
}

@-webkit-keyframes modalFadeIn {
  to { opacity: 1; }
}

@keyframes modalFadeIn {
  to { opacity: 1; }
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  -webkit-animation: modalSlideIn 0.3s ease;
          animation: modalSlideIn 0.3s ease;
}

.modal-lg {
  max-width: 520px;
  padding: 28px 24px;
}

@-webkit-keyframes modalSlideIn {
  from { -webkit-transform: translateY(20px) scale(0.97); transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { -webkit-transform: translateY(0) scale(1); transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes modalSlideIn {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.modal-lg .modal-header {
  margin-bottom: 16px;
}

.modal-header svg {
  color: var(--accent-light);
  margin-bottom: 8px;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Auth tabs (Login / Register) */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--accent);
  color: #fff;
}

.auth-tab:not(.active):hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group.floating-field {
  position: relative;
  margin-top: 4px;
}

.form-group.floating-field input {
  padding-top: 18px;
  padding-bottom: 10px;
}

.form-group.floating-field input::placeholder {
  color: transparent;
}

.form-group.floating-field label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  margin: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.2;
  pointer-events: none;
  transition: top 0.2s ease, transform 0.2s ease, color 0.2s ease, background 0.2s ease, font-size 0.2s ease;
}

.form-group.floating-field input:focus + label,
.form-group.floating-field input:not(:placeholder-shown) + label {
  top: 0;
  transform: translateY(-50%);
  background: #000;
  color: #ffffff;
  font-size: 0.68rem;
}

.modal-lg .modal-form {
  gap: 12px;
}

.modal-form select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.92rem;
  font-family: var(--font);
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
}

.modal-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select,
.panel-form-grid select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: var(--font);
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

select:focus,
.panel-form-grid select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-group input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  cursor: pointer;
}

/* =============================================
   MEDIA UPLOAD
   ============================================= */
.media-upload {
  position: relative;
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  transition: var(--transition);
  overflow: hidden;
}

.media-upload.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.media-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 12px;
  cursor: pointer;
  color: var(--text-muted);
  text-align: center;
}

.media-upload-placeholder svg {
  width: 24px;
  height: 24px;
}

.media-upload-placeholder svg {
  color: var(--accent-light);
  opacity: 0.6;
}

.media-upload-placeholder span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.media-upload-placeholder small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.media-upload-preview {
  width: 100%;
  max-height: 140px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border-radius: var(--radius-md);
}

.media-upload-preview img,
.media-upload-preview video {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
}

/* Multi-file preview grid */
.media-upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  padding: 10px;
}

.media-upload-previews.hidden {
  display: none;
}

.media-preview-item {
  position: relative;
  width: 100%;
  /* Fallback for browsers without aspect-ratio (pre-Chrome 88, pre-FF 89, pre-Safari 15) */
  padding-top: 100%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

@supports (aspect-ratio: 1) {
  .media-preview-item {
    padding-top: 0;
    height: auto;
    aspect-ratio: 1;
  }
}

.media-preview-item img,
.media-preview-item video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background: rgba(239, 68, 68, 0.85);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  z-index: 5;
}

.media-item-remove:hover {
  background: #ef4444;
  transform: scale(1.1);
}

html[dir="rtl"] .media-item-remove {
  right: auto;
  left: 4px;
}

.media-preview-add {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 100%;
  min-height: 80px; /* fallback for aspect-ratio */
  aspect-ratio: 1;
  border: 2px dashed var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  -webkit-transition: var(--transition);
  transition: var(--transition);
}

.media-preview-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Slideshow controls on portfolio cards */
.slide-media {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.slide-media.active {
  display: block;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s;
}

.portfolio-card:hover .slide-btn {
  opacity: 1;
}

.slide-prev {
  left: 6px;
}

.slide-next {
  right: 6px;
}

html[dir="rtl"] .slide-prev {
  left: auto;
  right: 6px;
}

html[dir="rtl"] .slide-next {
  right: auto;
  left: 6px;
}

.slide-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slide-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 4;
}

.slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.slide-dot.active {
  background: #fff;
}

.media-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: rgba(239, 68, 68, 0.85);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
}

.media-remove-btn:hover {
  background: #ef4444;
}

html[dir="rtl"] .media-remove-btn {
  right: auto;
  left: 8px;
}

/* =============================================
   LIGHTBOX — full-size image/video viewer
   ============================================= */
.lightbox-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-overlay.hidden {
  display: none;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-content video {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

html[dir="rtl"] .lightbox-close {
  right: auto;
  left: 20px;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

html[dir="rtl"] .lightbox-prev {
  left: auto;
  right: 16px;
}

html[dir="rtl"] .lightbox-next {
  right: auto;
  left: 16px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
}

/* =============================================
   PROJECT DETAIL MODAL
   ============================================= */
.project-detail-banner {
  width: calc(100% + 48px);
  margin: -28px -24px 20px;
  height: 160px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.project-detail-body {
  padding: 0 4px;
}

/* =============================================
   ADD PROJECT BUTTON
   ============================================= */
.add-project-wrap {
  text-align: center;
  margin-bottom: 32px;
}

.add-project-btn {
  gap: 8px;
}

html[dir="rtl"] .modal-close {
  right: auto;
  left: 16px;
}

html[dir="rtl"] .user-badge {
  margin-right: 0;
  margin-left: 8px;
}

/* =============================================
   ADMIN PANEL
   ============================================= */
.modal-xl {
  max-width: 780px;
  padding: 28px 24px;
}

.nav-admin-btn {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.nav-admin-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-color: transparent;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  gap: 4px;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: #ef4444;
  color: #fff;
  border-color: transparent;
}

/* Tabs */
.panel-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 20px;
}

.panel-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.panel-tab:hover {
  color: var(--text-primary);
}

.panel-tab.active {
  background: var(--accent-glow);
  color: var(--accent-light);
}

/* Toolbar */
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-toolbar h4 {
  font-size: 1rem;
  font-weight: 700;
}

/* Table */
.panel-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  table-layout: fixed;
}

.panel-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

/* Column widths — users table */
.panel-table th:first-child { width: 28%; }
.panel-table th:nth-child(2) { width: auto; }
.panel-table th:last-child { width: 140px; }

html[dir="rtl"] .panel-table th {
  text-align: right;
}

.panel-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  word-break: break-word;
}

.panel-table tr:last-child td {
  border-bottom: none;
}

/* Permissions cell */
.panel-table td:nth-child(2) {
  line-height: 1.8;
}

.panel-table .role-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.73rem;
  font-weight: 600;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent-light);
  white-space: nowrap;
  margin: 2px 3px;
}

.panel-table .role-badge.owner {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.perms-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  align-items: center;
}

.panel-table .td-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}

.panel-table .td-actions button {
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  white-space: nowrap;
}

.td-actions .btn-edit {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-light);
}

.td-actions .btn-edit:hover {
  background: var(--accent);
  color: #fff;
}

.td-actions .btn-del {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.td-actions .btn-del:hover {
  background: #ef4444;
  color: #fff;
}

/* Inline form */
.panel-inline-form {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 12px;
}

.panel-inline-form h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.panel-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel-form-grid .form-group-full {
  grid-column: 1 / -1;
}

.panel-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Permissions */
.permissions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.perm-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  transition: var(--transition);
}

.perm-check:hover {
  background: var(--accent-glow);
}

.perm-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.perm-label-protected {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Messages table */
.messages-table {
  table-layout: auto;
}

.messages-table th:nth-child(4) {
  min-width: 180px;
}

.msg-cell {
  max-width: 250px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.msg-date {
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.msg-email {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.82rem;
}

.msg-email:hover {
  text-decoration: underline;
}

.no-messages {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 32px 0;
}

@media (max-width: 600px) {
  .modal-xl {
    padding: 20px 16px;
  }

  .panel-form-grid {
    grid-template-columns: 1fr;
  }

  .permissions-grid {
    grid-template-columns: 1fr;
  }

  .panel-table .td-actions {
    flex-direction: column;
  }
}

/* =============================================
   ANIMATIONS
   ============================================= */
.fade-in {
  opacity: 0;
  -webkit-transform: translateY(30px);
          transform: translateY(30px);
  -webkit-transition: opacity 0.6s ease, -webkit-transform 0.6s ease;
          transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
          transform: translateY(0);
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Large / high-res screens */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
  .nav-container {
    max-width: 1400px;
    padding: 0 140px 0 24px;
  }
  html[dir="rtl"] .nav-container {
    padding: 0 24px 0 140px;
  }

  .hero {
    max-height: 900px;
  }

  .hero-title {
    font-size: 4.5rem;
  }

  .hero-desc {
    max-width: 700px;
    font-size: 1.15rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-height: 1200px) {
  .hero {
    max-height: 80vh;
  }
}

@media (max-width: 1024px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 24px;
  }
  html[dir="rtl"] .nav-container {
    padding: 0 24px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 4px;
    transition: var(--transition);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 30px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-img {
    height: 180px;
  }

  .slide-btn {
    width: 26px;
    height: 26px;
    font-size: 16px;
    opacity: 1;
  }

  .slide-dots {
    bottom: 6px;
  }

  .slide-dot {
    width: 6px;
    height: 6px;
  }

  .lightbox-btn {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }

  .portfolio-img {
    height: 160px;
  }

  .portfolio-info {
    padding: 16px;
  }

  .portfolio-info h3 {
    font-size: 1rem;
  }

  .portfolio-info p {
    font-size: 0.82rem;
  }

  .portfolio-tag {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .modal-lg {
    padding: 20px 16px;
  }

  .media-upload-previews {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .social-links {
    justify-content: center;
  }

  .social-link {
    min-width: 108px;
    height: 46px;
    font-size: 0.85rem;
  }
}

/* =============================================
   RTL / KURDISH LANGUAGE SUPPORT
   ============================================= */
html[dir="rtl"] {
  font-family: var(--font-ku);
}

html[dir="rtl"] body {
  font-family: var(--font-ku);
}

html[dir="rtl"] .logo {
  direction: ltr;
}

html[dir="rtl"] .nav-links {
  direction: rtl;
}

html[dir="rtl"] .hero-subtitle {
  letter-spacing: 1px;
}

html[dir="rtl"] .section-subtitle {
  letter-spacing: 1px;
}

html[dir="rtl"] .card::before {
  transform-origin: right;
}

html[dir="rtl"] .value {
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] .contact-item {
  flex-direction: row-reverse;
}

html[dir="rtl"] .contact-info {
  text-align: right;
}

html[dir="rtl"] .social-links {
  justify-content: flex-end;
}

html[dir="rtl"] .form-group {
  text-align: right;
}

html[dir="rtl"] .form-group.floating-field label {
  left: auto;
  right: 12px;
}

html[dir="rtl"] .footer-content {
  direction: rtl;
}

html[dir="rtl"] .skill-header {
  direction: rtl;
}

html[dir="rtl"] .skill-fill {
  border-radius: 10px;
  margin-left: auto;
  margin-right: 0;
}

html[dir="rtl"] .about-text {
  text-align: right;
}

html[dir="rtl"] .about-skills {
  text-align: right;
}

html[dir="rtl"] .portfolio-info {
  text-align: right;
}

@media (max-width: 768px) {
  html[dir="rtl"] .nav-links {
    right: auto;
    left: -100%;
    border-left: none;
    border-right: 1px solid var(--border);
  }

  html[dir="rtl"] .nav-links.open {
    left: 0;
    right: auto;
  }
}

/* =============================================
   THEME TOGGLE BUTTON
   ============================================= */
.theme-toggle-btn {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 1100;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: rgba(22, 22, 31, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--accent-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.theme-toggle-btn:hover {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
}

html[dir="rtl"] .theme-toggle-btn {
  right: auto;
  left: 16px;
}

/* =============================================
   THEME PANEL
   ============================================= */
.theme-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.theme-backdrop.hidden { display: none; }

.theme-panel {
  position: fixed;
  z-index: 3001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92vw;
  max-width: 500px;
  background: #111118;
  border: 1px solid #2a2a38;
  border-radius: 18px;
  overflow: hidden;
  animation: themePanelIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-panel.hidden { display: none; }

@keyframes themePanelIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #1e1e2a;
}

.theme-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #2a2a38;
  background: #0a0a0f;
  color: #9d9daa;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1;
}

.theme-panel-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.theme-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
}

.theme-panel-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.theme-panel-name {
  font-family: var(--font-ku);
  font-size: 0.95rem;
  font-weight: 700;
  color: #e8e8ed;
  direction: rtl;
}

.theme-swatches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 20px;
}

.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.swatch-gradient {
  width: 100%;
  aspect-ratio: 5 / 3;
  border-radius: 10px;
  position: relative;
  transition: transform 0.2s ease;
  outline: 2.5px solid transparent;
  outline-offset: 2px;
}

.theme-swatch:hover .swatch-gradient {
  transform: scale(1.05);
}

.theme-swatch.active .swatch-gradient {
  outline-color: #f59e0b;
}

.swatch-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.15s;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

.theme-swatch.active .swatch-check {
  opacity: 1;
}

.swatch-name {
  font-family: var(--font-ku);
  font-size: 0.7rem;
  color: #9d9daa;
  text-align: center;
  direction: rtl;
  line-height: 1.3;
}
/* =============================================
   GOOGLE SIGN-IN BUTTON
   ============================================= */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.divider::before { margin-right: 10px; }
.divider::after  { margin-left: 10px; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  margin-top: 4px;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #c6c6c6;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
  transform: translateY(-1px);
}

.btn-google:active {
  background: #f1f3f4;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  transform: translateY(0);
}

.btn-google svg {
  flex-shrink: 0;
}

/* RTL support */
html[dir="rtl"] .btn-google {
  flex-direction: row-reverse;
}
/* =============================================
   SOCIAL CHIP — brand colours
   ============================================= */
.social-link[data-social="instagram"] { --chip-active: #E1306C; --chip-shadow: rgba(225, 48, 108, 0.38); }
.social-link[data-social="facebook"]  { --chip-active: #1877F2; --chip-shadow: rgba(24, 119, 242, 0.38); }
.social-link[data-social="tiktok"]    { --chip-active: #111111; --chip-shadow: rgba(0, 0, 0, 0.35); }