@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --content-max-width: 1100px;
  --page-padding: 40px;

  /* Theme: Dark Mode (Default) */
  --bg-primary: #080710;
  --bg-card: rgba(17, 16, 26, 0.65);
  --bg-input: rgba(28, 26, 43, 0.5);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: #a855f7;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --brand-primary: #8b5cf6;
  --brand-secondary: #d946ef;
  --brand-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
  --brand-gradient-hover: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);
  --error-color: #f43f5e;
  --success-color: #10b981;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --glow-shadow: 0 0 25px rgba(139, 92, 246, 0.3);
  --backdrop-blur: blur(20px);
  --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  --glow-accent-1: rgba(139, 92, 246, 0.15);
  --glow-accent-2: rgba(217, 70, 239, 0.15);
}

/* ==========================================================================
   FULL RTL FLIP OVERRIDES (Applied when `dir="rtl"` or `.lang-ar` is set)
   - Swaps columns, flips icon positions, adjusts paddings/margins and borders
   ========================================================================= */

html[dir="rtl"], .lang-ar {
  direction: rtl;
}

/* Swap main split panels (form <-> visual) */
.lang-ar .app-container, html[dir="rtl"] .app-container {
  grid-template-columns: 1.1fr 1fr;
}
.lang-ar .form-panel, html[dir="rtl"] .form-panel {
  grid-column: 2;
}
.lang-ar .visual-panel, html[dir="rtl"] .visual-panel {
  grid-column: 1;
  border-right: 1px solid var(--border-color);
  border-left: none;
}

/* Flip input icons and padding */
.lang-ar .input-icon, html[dir="rtl"] .input-icon {
  right: 16px;
  left: auto;
}
.lang-ar .form-input, html[dir="rtl"] .form-input {
  padding: 16px 48px 16px 16px; /* icon is on the right */
  text-align: right;
}

/* Password toggle icon */
.lang-ar .password-toggle-btn, html[dir="rtl"] .password-toggle-btn {
  left: 16px;
  right: auto;
}

/* Checkbox marker alignment */
.lang-ar .checkbox-container .checkmark, html[dir="rtl"] .checkbox-container .checkmark {
  margin-left: 10px;
  margin-right: 0;
}

/* Divider and underline origin flips */
.lang-ar .forgot-link::after, html[dir="rtl"] .forgot-link::after,
.lang-ar .terms-link::after, html[dir="rtl"] .terms-link::after {
  transform-origin: bottom left;
}
.lang-ar .divider:not(:empty)::before, html[dir="rtl"] .divider:not(:empty)::before {
  margin-left: 1.5em;
  margin-right: 0;
}
.lang-ar .divider:not(:empty)::after, html[dir="rtl"] .divider:not(:empty)::after {
  margin-right: 1.5em;
  margin-left: 0;
}

/* Mirror primary button shine */
.lang-ar .btn-primary::before, html[dir="rtl"] .btn-primary::before {
  left: auto;
  right: -150%;
  transform: skewX(25deg);
}
.lang-ar .btn-primary:hover::before, html[dir="rtl"] .btn-primary:hover::before {
  right: 150%;
}

/* Cart drawer */
.lang-ar .cart-drawer {
  right: auto;
  left: -380px;
  border-left: none;
  border-right: 1px solid var(--border-color);
  box-shadow: 15px 0 35px rgba(0, 0, 0, 0.3);
}
.lang-ar .cart-drawer.active, html[dir="rtl"] .cart-drawer.active {
  left: 0;
}

/* Profile dropdown flip */
.lang-ar .profile-dropdown-menu, html[dir="rtl"] .profile-dropdown-menu {
  right: auto;
  left: 0;
  transform-origin: top left;
}

/* Product tags and category positions */
.lang-ar .product-category-tag, html[dir="rtl"] .product-category-tag {
  left: auto;
  right: 14px;
}

/* Mock email toast on the left for RTL */
.lang-ar .mock-email-toast, html[dir="rtl"] .mock-email-toast {
  right: auto;
  left: 24px;
  direction: rtl;
}

/* Ticker should scroll reversed for RTL (already handled via [lang="ar"]) */

/* Dashboard sidebar border flip */
.lang-ar .dash-sidebar, html[dir="rtl"] .dash-sidebar {
  border-right: none;
  border-left: 1px solid var(--border-color);
}

/* Table and admin alignment */
.lang-ar .admin-table, html[dir="rtl"] .admin-table { text-align: right; }
.lang-ar .action-btn-row, html[dir="rtl"] .action-btn-row { justify-content: flex-start; }


[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-input: rgba(241, 245, 249, 0.8);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-focus: #8b5cf6;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --brand-primary: #7c3aed;
  --brand-secondary: #db2777;
  --brand-gradient: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  --brand-gradient-hover: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --shadow-color: rgba(15, 23, 42, 0.08);
  --glow-shadow: 0 0 25px rgba(124, 58, 237, 0.12);
  --glass-reflection: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
  --glow-accent-1: rgba(124, 58, 237, 0.08);
  --glow-accent-2: rgba(219, 39, 119, 0.08);
}

/* RTL Support - Arabic Font Overrides */
html[lang="ar"] {
  --font-heading: 'Tajawal', sans-serif;
  --font-body: 'Tajawal', sans-serif;
  direction: rtl;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Animated Blobs in background */
.ambient-bg {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.8;
  animation: float 20s infinite alternate;
}

.blob-1 {
  width: 400px;
  height: 400px;
  background-color: var(--glow-accent-1);
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background-color: var(--glow-accent-2);
  bottom: -15%;
  right: -10%;
  animation-duration: 30s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(80px, 50px) scale(1.1) rotate(180deg);
  }
  100% {
    transform: translate(-40px, -60px) scale(0.9) rotate(360deg);
  }
}

/* Page Wrapper for Form pages */
.app-container {
  width: 100%;
  max-width: 550px;
  min-height: auto;
  margin: 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 25px 50px -12px var(--shadow-color);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Responsive Split Design */
@media (max-width: 1024px) {
  .app-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    max-width: calc(100% - 48px);
    min-height: auto;
    padding: 24px;
  }
}

/* Collapse to single column and hide visual panel on smaller screens */
@media (max-width: 900px) {
  .app-container {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 32px);
    padding: 18px;
  }
  .form-panel { max-width: 100%; width: 100%; }

  .visual-panel {
    display: none !important;
  }
}

/* Form Panel Styling */
.form-panel {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

@media (max-width: 480px) {
  .form-panel {
    padding: 40px 24px;
  }
}

/* Header, Actions & Language Toggle */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  text-decoration: none;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo svg {
  fill: var(--brand-primary);
  width: 28px;
  height: 28px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn, .lang-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle-btn {
  width: 42px;
}

.lang-toggle-btn {
  padding: 0 16px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
}

.theme-toggle-btn:hover, .lang-toggle-btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--glow-shadow);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle-btn .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: none;
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: block;
}

/* Form Headings */
.form-title-group {
  margin-bottom: 35px;
}

.form-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.form-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Input Fields Group */
.form-group {
  margin-bottom: 22px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s ease;
}

.form-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}
textarea.form-input {
  padding: 16px;
  width: 100%;
  resize: vertical;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--glow-shadow);
}

.form-input:focus + .input-icon {
  color: var(--brand-primary);
}

/* Password Toggle Icon */
.password-toggle-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  padding: 4px;
}

.password-toggle-btn:hover {
  color: var(--text-primary);
}

.password-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Action Links Block */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 0.85rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  color: var(--text-secondary);
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  display: inline-block;
  height: 18px;
  width: 18px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  margin-right: 10px;
  transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--border-focus);
}

.checkbox-container input:checked ~ .checkmark {
  background: var(--brand-gradient);
  border-color: transparent;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.forgot-link, .terms-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
  position: relative;
}

.forgot-link::after, .terms-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1.5px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

.forgot-link:hover::after, .terms-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Primary Button Styling */
.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.5px;
  color: #ffffff;
  background: var(--brand-gradient);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-shadow);
  background: var(--brand-gradient-hover);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn-primary:hover::before {
  left: 150%;
  transition: 0.75s;
}

/* Or Divider Styling */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1.5px solid var(--border-color);
}

.divider:not(:empty)::before {
  margin-right: 1.5em;
}

.divider:not(:empty)::after {
  margin-left: 1.5em;
}

/* Social Buttons Container */
.social-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

/* Custom Google Sign-In Button Styling */
.btn-google {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.btn-google:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

[data-theme="light"] .btn-google:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

/* Custom Apple Sign-In Button Styling (Guidelines conform) */
.btn-apple {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  background-color: #ffffff;
  border: 1.5px solid transparent;
  color: #000000;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.btn-apple:hover {
  background-color: #f4f4f5;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.btn-apple svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

[data-theme="light"] .btn-apple {
  background-color: #000000;
  color: #ffffff;
}

[data-theme="light"] .btn-apple:hover {
  background-color: #1e1e24;
}

/* Navigation Links below button */
.form-footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-footer-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 5px;
}

.form-footer-link:hover {
  text-decoration: underline;
}

/* Error Messages formatting */
.error-msg {
  color: var(--error-color);
  font-size: 0.8rem;
  margin-top: 5px;
  display: none;
  align-items: center;
  gap: 5px;
  animation: fadeInError 0.3s forwards ease-in-out;
}

.error-msg.visible {
  display: flex;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visual Panel Styling */
.visual-panel {
  background: linear-gradient(145deg, #121021 0%, #080710 100%);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  border-left: 1px solid var(--border-color);
}

.visual-panel-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-primary) 0%, rgba(139, 92, 246, 0) 70%);
  filter: blur(40px);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
  animation: pulseGlow 8s infinite alternate;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    opacity: 0.25;
  }
  100% {
    transform: scale(1.2);
    opacity: 0.4;
  }
}

.visual-image-wrapper {
  z-index: 2;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 380px;
  margin-bottom: 40px;
}

.visual-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
  animation: hoverImage 6s ease-in-out infinite;
}

@keyframes hoverImage {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

.visual-content {
  z-index: 2;
  text-align: center;
  max-width: 350px;
}

.visual-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.visual-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Page transition styles */
.fade-in-element {
  animation: elementFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes elementFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delay modifiers for stagger animation */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }


/* ==========================================================================
   CUSTOMER DASHBOARD & PRODUCTS CATALOG STYLING (NEW)
   ========================================================================= */

/* Main Full Width Layout container */
.dashboard-container {
  width: calc(100% - 48px);
  max-width: var(--content-max-width);
  margin: 20px auto;
  border-radius: 28px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  box-shadow: 0 30px 60px -15px var(--shadow-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 1;
  min-height: 90vh;
}

/* Header Navbar */
.dash-header {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.dash-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Cart Button with Counter Badge */
.cart-trigger-btn {
  position: relative;
  width: 44px;
  height: 44px;
}

.cart-trigger-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-gradient);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px; height: 20px;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.4);
  animation: pulseBadge 2s infinite alternate;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* User Profile Badge */
.profile-dropdown-container {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-trigger:hover {
  border-color: var(--border-focus);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dropdown Menu */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: var(--backdrop-blur);
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  padding: 10px;
  z-index: 100;
  transform-origin: top right;
  animation: dropdownFade 0.2s ease-out forwards;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-5px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-dropdown-menu.active {
  display: flex;
}

.dropdown-header-info {
  padding: 8px 12px 12px 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.dropdown-user-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.dropdown-item {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background-color: var(--bg-input);
  color: var(--border-focus);
}

.dropdown-item.logout {
  color: var(--error-color);
}

.dropdown-item.logout:hover {
  background-color: rgba(244, 63, 94, 0.08);
}

/* Split Main Panel Grid */
.dash-content-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  flex: 1;
}

@media (max-width: 992px) {
  .dash-content-grid {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    border-bottom: 1px solid var(--border-color);
    border-right: none !important;
    border-left: none !important;
  }
}

/* Sidebar Analytics Panel */
.dash-sidebar {
  padding: 30px;
  background: rgba(17, 16, 26, 0.2);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.stat-card {
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.stat-card-desc {
  font-size: 0.75rem;
  color: var(--success-color);
  font-weight: 600;
}

/* Interactive SVG Spending Line Chart */
.chart-container {
  margin-top: 10px;
}

.chart-svg {
  width: 100%;
  height: 80px;
  overflow: visible;
}

.chart-path-glow {
  stroke: var(--border-focus);
  stroke-width: 4px;
  fill: none;
  filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.4));
}

/* Products Main Catalog Section */
.catalog-section {
  padding: 30px 40px;
}

.catalog-welcome-banner {
  padding: 30px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(217, 70, 239, 0.1) 100%);
  border: 1px solid rgba(255,255,255,0.03);
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.catalog-welcome-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
}

.catalog-welcome-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-focus);
  box-shadow: var(--glow-shadow);
}

.product-image-box {
  height: 190px;
  position: relative;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(217, 70, 239, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-box svg {
  width: 64px;
  height: 64px;
  color: var(--brand-primary);
  filter: drop-shadow(0 8px 12px rgba(139, 92, 246, 0.3));
  transition: transform 0.5s ease;
}

.product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image-box svg {
  transform: scale(1.15) rotate(5deg);
}

.product-card:hover .product-image-box img {
  transform: scale(1.05);
}

.product-category-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--brand-gradient);
}

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-title-row {
  margin-bottom: 8px;
}

.product-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.product-rating {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  color: #f59e0b; /* Yellow rating star color */
  font-size: 0.85rem;
}

.product-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.product-add-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.product-add-btn:hover {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 5px 15px rgba(217, 70, 239, 0.3);
}

.product-add-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Shopping Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100%;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border-left: 1px solid var(--border-color);
  box-shadow: -15px 0 35px rgba(0, 0, 0, 0.3);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
  right: 0;
}

.cart-drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.cart-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  padding: 4px;
}

.cart-close-btn:hover {
  color: var(--text-primary);
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Simple Cart Item layout */
.cart-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 700;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.cart-item-remove-btn {
  background: none;
  border: none;
  color: var(--error-color);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.cart-item-remove-btn:hover {
  text-decoration: underline;
}

.cart-drawer-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background: rgba(17, 16, 26, 0.2);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
}

.cart-total-price {
  font-family: var(--font-heading);
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-family: var(--font-heading);
  color: white;
  background: var(--brand-gradient);
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
  transition: all 0.2s ease;
  text-align: center;
}

.checkout-btn:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-1px);
}


/* ==========================================================================
   RTL Dashboard Overrides
   ========================================================================= */

html[lang="ar"] .dash-header {
  /* No special absolute spacing needed as flexbox flips direction naturally */
}

html[lang="ar"] .profile-dropdown-menu {
  right: auto;
  left: 0;
  transform-origin: top left;
}

html[lang="ar"] .form-input {
  padding: 16px 48px 16px 16px;
}
html[lang="ar"] textarea.form-input {
  padding: 16px;
}

html[lang="ar"] .dropdown-item {
  text-align: right;
}

html[lang="ar"] .dash-sidebar {
  border-right: none;
  border-left: 1px solid var(--border-color);
}

html[lang="ar"] .product-category-tag {
  left: auto;
  right: 14px;
}

html[lang="ar"] .cart-drawer {
  right: auto;
  left: -380px;
  border-left: none;
  border-right: 1px solid var(--border-color);
  box-shadow: 15px 0 35px rgba(0, 0, 0, 0.3);
}

html[lang="ar"] .cart-drawer.active {
  left: 0;
}


/* ==========================================================================
   ADMIN MANAGEMENT TABS & CRUD STYLING (NEW)
   ========================================================================= */

.sidebar-tabs-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.tab-nav-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: all 0.25s ease;
}

html[lang="ar"] .tab-nav-btn {
  text-align: right;
}

.tab-nav-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.tab-nav-btn.active {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--brand-primary);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.tab-panel {
  display: none;
  animation: panelFade 0.4s ease forwards;
}

.tab-panel.active {
  display: block;
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Administrative Table Styles */
.admin-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

html[lang="ar"] .admin-table {
  text-align: right;
}

.admin-table th {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

/* Action Buttons inside tables */
.action-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

html[lang="ar"] .action-btn-row {
  justify-content: flex-start;
}

.action-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.action-btn.edit {
  color: var(--brand-primary);
  background: rgba(139, 92, 246, 0.05);
}

.action-btn.edit:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--brand-primary);
}

.action-btn.delete {
  color: var(--error-color);
  background: rgba(244, 63, 94, 0.04);
  border-color: rgba(244, 63, 94, 0.1);
}

.action-btn.delete:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--error-color);
}

/* Modal Overlay & Card UI */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.6rem;
  padding: 4px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.select-input {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='gray' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px !important;
}

html[lang="ar"] .select-input {
  background-position: left 14px center;
  padding-left: 40px !important;
  padding-right: 16px !important;
}

.select-input option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Storefront Product Card Grid and Buttons */
.product-card-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 5px;
}

.product-card-buttons-grid .action-btn {
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color);
}

.product-card-buttons-grid .card-add-to-cart-btn {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.product-card-buttons-grid .card-add-to-cart-btn:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-focus);
}

.product-card-buttons-grid .card-buy-now-btn {
  background: var(--brand-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.15);
}

.product-card-buttons-grid .card-buy-now-btn:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(139, 92, 246, 0.25);
}

/* Premium Mock Email Notification Toast */
.mock-email-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 380px;
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.15);
  z-index: 10000;
  transform: translateY(-150%) scale(0.9);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #ffffff;
  font-family: 'Inter', system-ui, sans-serif;
  direction: ltr; /* English template fallback */
}

html[lang="ar"] .mock-email-toast {
  right: auto;
  left: 24px;
  direction: rtl; /* RTL Support */
}

.mock-email-toast.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.mock-email-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #a78bfa;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.mock-email-sender {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-email-sender svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.mock-email-subject {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  margin-top: 4px;
}

.mock-email-body {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-email-toast .temp-pass-display {
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 1px;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 0 4px;
}

.mock-email-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mock-email-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ==========================================================================
   ANIMATED PRODUCT MARQUEE / TICKER STRIP
   ========================================================================== */

.product-ticker-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(99,102,241,0.04) 50%, rgba(236,72,153,0.06) 100%);
  border-top: 1px solid rgba(139,92,246,0.18);
  border-bottom: 1px solid rgba(139,92,246,0.18);
  z-index: 10;
  flex-shrink: 0;
}

.product-ticker-wrapper::before,
.product-ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.product-ticker-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-primary, #0f0f1a), transparent);
}
.product-ticker-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-primary, #0f0f1a), transparent);
}

.product-ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
  will-change: transform;
  padding: 12px 0;
}

.product-ticker-wrapper:hover .product-ticker-track {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  margin: 0 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 16px;
  white-space: nowrap;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 200px;
}

.ticker-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.07) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ticker-card:hover {
  background: rgba(139,92,246,0.10);
  border-color: rgba(139,92,246,0.5);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 10px 28px rgba(139,92,246,0.22), 0 0 0 1px rgba(139,92,246,0.12);
  cursor: pointer;
}

.ticker-card:hover::before { opacity: 1; }

.ticker-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ticker-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.ticker-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.ticker-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticker-price {
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-heading, 'Inter', sans-serif);
  color: var(--brand-secondary, #a78bfa);
}

.ticker-category {
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 4px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticker-stars {
  font-size: 0.65rem;
  color: #f59e0b;
  letter-spacing: 1px;
}

.ticker-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(139,92,246,0.45);
  flex-shrink: 0;
  margin: 0 6px;
}

.ticker-badge {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  flex-shrink: 0;
}

[lang="ar"] .product-ticker-track {
  animation-direction: reverse;
}



/* ==========================================================================
   RESPONSIVE LAYOUT GRIDS & MEDIA QUERIES (TABLET & MOBILE)
   ========================================================================== */

/* Base Desktop Layouts */
.dashboard-stats-grid {
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px; 
  margin-bottom: 30px;
}
.dashboard-panels-grid {
  display: grid; 
  grid-template-columns: 1.5fr 1fr; 
  gap: 30px;
}
.cart-layout-grid {
  display: grid; 
  grid-template-columns: 2fr 1fr; 
  gap: 40px;
}

/* TABLET (max-width: 1024px) */
@media (max-width: 1024px) {
  .dashboard-container {
    margin: 12px;
  }
  .catalog-section, .dash-content {
    padding: 30px;
  }
  .dash-header {
    padding: 15px 30px;
  }
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-panels-grid {
    grid-template-columns: 1fr;
  }
  .cart-layout-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* MOBILE / SMALL DEVICE (max-width: 768px) */
@media (max-width: 768px) {
  .dashboard-container {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
  }
  .dash-header {
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
  }
  .dash-header > div {
    justify-content: center;
    width: 100%;
  }
  .dash-nav-actions {
    width: 100%;
    justify-content: center;
  }
  .catalog-section, .dash-content {
    padding: 20px 15px;
  }
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
  }
  .catalog-welcome-banner {
    padding: 20px;
  }
  .catalog-welcome-title {
    font-size: 1.5rem;
  }
  .modal-card {
    padding: 24px;
    margin: 15px;
  }
}

/* EXTRA SMALL MOBILE (max-width: 480px) */
@media (max-width: 480px) {
  .dash-header {
    padding: 12px 10px;
  }
  .dash-nav-actions {
    gap: 8px;
  }
  .profile-name-text {
    display: none; /* Hide name on very small screens to save space */
  }
  .brand-logo {
    font-size: 1.1rem;
  }
  .admin-header h2 {
    font-size: 1.3rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
}




/* Mada icon styling for dark theme */
.mada-icon {
    background-color: white;
    border-radius: 4px;
    padding: 4px 10px; height: 20px;
}

[data-theme="light"] .mada-icon {
    background-color: transparent;
    padding: 0;
}

.sama-symbol { display: inline-block; width: 1.2em; height: 1.2em; background-color: currentColor; -webkit-mask: url('sar_symbol.svg') no-repeat center / contain; mask: url('sar_symbol.svg') no-repeat center / contain; vertical-align: text-bottom; margin: 0 4px; }

/* Quick Guide Dropdown */
.nav-dropdown-container {
  position: relative;
  display: inline-block;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 100;
}

.nav-dropdown-container:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  top: calc(100% + 5px);
}

.nav-dropdown-item {
  padding: 10px 15px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, color 0.2s;
}

.nav-dropdown-item:hover {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
}
