:root {
  --primary: #800020;
  --primary-hover: #630018;
  --secondary: #c59b27;
  --secondary-hover: #aa841d;
  --bg-main: #0b0f17;
  --bg-card: #ffffff;
  --text-main: #1a202c;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --danger: #b91c1c;
  --success: #15803d;
  --warning: #b45309;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Cairo", "Tahoma", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 14px;
}

[dir="rtl"] body {
  font-family: "Cairo", "Segoe UI", "Tahoma", -apple-system, sans-serif;
}

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

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.tesla-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 15, 23, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.3s ease;
}

.tesla-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 48px;
  width: 48px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(197, 155, 39, 0.5);
  flex-shrink: 0;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-logo-text {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.brand-logo-text:hover {
  text-decoration: none;
}

.brand-slogan {
  font-size: 10px;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tesla-nav {
  display: flex;
  gap: 28px;
}

.tesla-nav-link {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background-color 0.2s ease;
}

.tesla-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-selector,
.lang-selector-dash {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.tesla-btn-nav {
  background-color: var(--primary);
  color: #ffffff;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tesla-btn-nav:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.tesla-scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.tesla-slide {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  padding: 110px 24px 30px 24px;
}

.tesla-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(11, 15, 23, 0.6) 0%, rgba(11, 15, 23, 0.2) 40%, rgba(11, 15, 23, 0.75) 100%);
  z-index: 1;
}

.tesla-content-top {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
}

.tesla-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(197, 155, 39, 0.5);
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #f1d78a;
  border-radius: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

.tesla-title {
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.tesla-subtitle {
  font-size: clamp(14px, 1.8vw, 18px);
  color: #e2e8f0;
  line-height: 1.6;
  max-width: 780px;
  margin: 0 auto 16px auto;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.tesla-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  background: rgba(128, 0, 32, 0.85);
  border: 1px solid rgba(197, 155, 39, 0.6);
  color: #fce79a;
  font-size: 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  flex-wrap: wrap;
  justify-content: center;
}

.price-original-striked {
  text-decoration: line-through;
  opacity: 0.75;
  color: #ffcccc;
  font-size: 14px;
}

.price-discount-badge {
  background: #c59b27;
  color: #111111;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}

.tesla-content-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 680px;
}

.tesla-btn-group {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.tesla-btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  padding: 13px 32px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 220px;
  transition: all 0.2s ease;
}

.tesla-btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.tesla-btn-secondary {
  background-color: rgba(255, 255, 255, 0.9);
  color: #1a202c;
  padding: 13px 32px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  min-width: 220px;
  transition: all 0.2s ease;
}

.tesla-btn-secondary:hover {
  background-color: #ffffff;
  text-decoration: none;
}

.tesla-btn-share {
  background-color: rgba(11, 15, 23, 0.75);
  color: var(--secondary);
  padding: 13px 26px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--secondary);
  min-width: 170px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tesla-btn-share:hover {
  background-color: var(--secondary);
  color: #0b0f17;
  text-decoration: none;
}

.tesla-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  cursor: pointer;
  animation: bounceCue 2s infinite;
}

@keyframes bounceCue {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(6px);
  }
  60% {
    transform: translateY(3px);
  }
}

.shape-indicator-down {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid rgba(255, 255, 255, 0.85);
}

.tesla-contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tesla-contact-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid var(--secondary);
  padding: 16px;
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.tesla-contact-label {
  font-size: 11px;
  font-weight: 700;
  color: #f1d78a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tesla-contact-val {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.tesla-footer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  padding-top: 8px;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f8f9fa;
  color: var(--text-main);
}

.dashboard-sidebar {
  width: 250px;
  background-color: #1e293b;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 2px solid var(--primary);
}

[dir="rtl"] .dashboard-sidebar {
  border-right: none;
  border-left: 2px solid var(--primary);
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sidebar-logo-img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(197, 155, 39, 0.4);
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-user strong {
  font-size: 13px;
  color: #e2e8f0;
}

.user-role-badge {
  font-size: 11px;
  color: #f1d78a;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  flex-grow: 1;
}

.sidebar-link {
  background: transparent;
  border: none;
  color: #cbd5e1;
  text-align: left;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-left: 3px solid transparent;
  width: 100%;
}

[dir="rtl"] .sidebar-link {
  text-align: right;
  border-left: none;
  border-right: 3px solid transparent;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.sidebar-link.active {
  background-color: rgba(128, 0, 32, 0.4);
  color: #ffffff;
  border-left-color: var(--secondary);
}

[dir="rtl"] .sidebar-link.active {
  border-left-color: transparent;
  border-right-color: var(--secondary);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-content {
  flex-grow: 1;
  padding: 24px 30px;
  background-color: #f8f9fa;
  color: var(--text-main);
  overflow-y: auto;
}

.content-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.content-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
}

.shape-diamond {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--secondary);
  transform: rotate(45deg);
}

.offer-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.gallery-photo {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.modal-highlight-box {
  background: #fdf8e6;
  border: 1px solid var(--secondary);
  padding: 12px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius);
}

.modal-desc {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #334155;
}

.modal-subheading {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.category-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.category-item-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.category-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
}

.modal-footer-info {
  background: #f1f5f9;
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  font-size: 12px;
  color: #475569;
}

[dir="rtl"] .modal-footer-info {
  border-left: none;
  border-right: 3px solid var(--primary);
}

.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
}

.stat-card.accent-gold {
  border-top-color: var(--secondary);
}

.stat-card.accent-green {
  border-top-color: #166534;
}

.stat-card.accent-red {
  border-top-color: #b02a37;
}

.stat-card.accent-blue {
  border-top-color: #0284c7;
}

.stat-card-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.stat-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.stat-progress-fill.fill-green {
  background-color: #16a34a;
}

.stat-progress-fill.fill-orange {
  background-color: #ea580c;
}

.stat-progress-fill.fill-blue {
  background-color: #0284c7;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: bold;
  font-size: 12px;
  color: #ffffff;
}

.rank-1 { background-color: #c59b27; }
.rank-2 { background-color: #94a3b8; }
.rank-3 { background-color: #b45309; }
.rank-other { background-color: #cbd5e1; color: #334155; }

.search-module-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.global-search-dropdown-item {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  transition: background 0.15s;
}

.global-search-dropdown-item:hover {
  background: #f8fafc;
}

.global-search-dropdown-item:last-child {
  border-bottom: none;
}

@media (max-width: 840px) {
  .tesla-header-inner {
    padding: 12px 16px;
  }
  .tesla-nav {
    display: none;
  }
  .tesla-btn-group {
    flex-direction: column;
    width: 100%;
  }
  .tesla-btn-primary,
  .tesla-btn-secondary,
  .tesla-btn-share {
    width: 100%;
    min-width: unset;
  }
  .dashboard-layout {
    flex-direction: column;
  }
  .dashboard-sidebar {
    width: 100%;
  }
}

/* Client Comptoir Enhancements */
.client-row-clickable {
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}
.client-row-clickable:hover {
  background-color: #f1f5f9 !important;
}
.client-name-badge {
  font-weight: 700;
  color: #800020;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.client-name-badge:hover {
  text-decoration: underline;
  color: #a01030;
}
.dossier-tab-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dossier-tab-btn.active {
  background: #800020;
  color: #fff;
  border-color: #800020;
}
.dossier-tab-content {
  display: none;
}
.dossier-tab-content.active {
  display: block;
}

