/* LUXBYTE Unified Theme - Enhanced Version */
/* LUXBYTE - منصة الأعمال الذكية */

/* Import Dashboard Styles */
@import url('css/dashboard.css');
@import url('css/dashboard-fixes.css');
@import url('css/components/cards.css');

/* Performance Optimizations */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Enhanced Loading States */
.loading-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #666;
}

.loading-spinner i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Enhanced Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  color: white;
}

/* Enhanced Form Controls */
.form-control:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
  outline: none;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-valid {
  border-color: #28a745;
}

/* Enhanced Buttons */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
}

/* Enhanced Cards */
.card {
  transition: all 0.3s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-5px);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  .notification {
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .card {
    margin: 10px;
    border-radius: 15px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Global Background */
body {
    background: url('assets/images/backgrounds/screen-1.png') center/cover no-repeat fixed;
    min-height: 100vh;
}

/* إخفاء الخلفية البيضاء من العناصر الأخرى */
.site-header {
    background: transparent !important;
}

main {
    background: transparent !important;
}

.container {
    background: transparent !important;
}

/* الكروت فقط بخلفية بيضاء */
.card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
:root {
  /* الألوان الأساسية */
  --primary: #21808d;
  --primary-dark: #1a6b75;
  --primary-light: #2a9bb0;
  --secondary: #6b7cff;
  --accent: #7a3cff;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* الألوان المحايدة */
  --white: #ffffff;
  --black: #000000;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* الألوان المخصصة للثيم الموحد */
  --bg-image: url('assets/images/backgrounds/screen-1.png');
  --bg-body: var(--white);
  --bg-card: var(--white);
  --bg-card-hover: var(--gray-50);
  --text: var(--black);
  --text-muted: var(--gray-700);
  --text-light: var(--gray-600);
  --border: var(--gray-200);
  --border-hover: var(--gray-300);

  /* الألوان الخاصة */
  --gold: #d4af37;
  --gold-light: #f4d03f;
  --gold-dark: #b7950b;
  --red: #dc2626;
  --red-light: #ef4444;
  --red-dark: #b91c1c;

  /* الظلال */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-gold: 0 4px 14px 0 rgba(212, 175, 55, 0.3);
}

/* إزالة جميع الثيمات القديمة */
.theme-dark,
.theme-light {
  /* لا توجد تغييرات - ثيم موحد فقط */
}

/* الخطوط */
html {
  font-family: 'Cairo', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-body);
}

/* الخلفية الأساسية */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: 'Cairo', sans-serif;
  color: var(--text);
}

/* إزالة تأثيرات الثيمات القديمة */
* {
  box-sizing: border-box;
}

/* البار الأفقي - أحمر */
.navbar, .header, .top-bar {
  background: var(--red) !important;
  color: var(--white) !important;
  border-bottom: 3px solid var(--gold) !important;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar a, .header a, .top-bar a {
  color: var(--white) !important;
}

.navbar a:hover, .header a:hover, .top-bar a:hover {
  color: var(--gold-light) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* الكروت - خلفية بيضاء مع إطار ذهبي */
.card {
  background: var(--bg-card) !important;
  border: 2px solid var(--gold) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-gold) !important;
  color: var(--text) !important;
  margin: 16px 0;
  padding: 24px;
  transition: all 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover) !important;
  box-shadow: var(--shadow-xl) !important;
  transform: translateY(-2px);
}

.card-title {
  color: var(--text) !important;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
}

.card-description {
  color: var(--text-muted) !important;
  line-height: 1.6;
}

/* الأزرار - سوداء مع خط أبيض */
.btn {
  background: var(--black) !important;
  color: var(--white) !important;
  border: 2px solid var(--black) !important;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  min-height: 40px;
}

.btn:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.btn:hover {
  background: var(--gray-800) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* أزرار خاصة */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-success {
  background: var(--success) !important;
  border-color: var(--success) !important;
}

.btn-warning {
  background: var(--warning) !important;
  border-color: var(--warning) !important;
  color: var(--black) !important;
}

.btn-error {
  background: var(--error) !important;
  border-color: var(--error) !important;
}

/* النماذج */
.form-control {
  background: var(--white) !important;
  border: 2px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--gold) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
  color: var(--text-light) !important;
}

.form-label {
  color: var(--text) !important;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

/* القوائم */
.menu, .dropdown, .nav-menu {
  background: var(--white) !important;
  border: 2px solid var(--gold) !important;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  color: var(--text) !important;
}

.menu-item, .dropdown-item, .nav-item {
  color: var(--text) !important;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.menu-item:hover, .dropdown-item:hover, .nav-item:hover {
  background: var(--gray-50) !important;
  color: var(--text) !important;
}

.menu-item:last-child, .dropdown-item:last-child, .nav-item:last-child {
  border-bottom: none;
}

/* الجداول */
.table {
  background: var(--white) !important;
  border: 2px solid var(--gold) !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table th {
  background: var(--gray-100) !important;
  color: var(--text) !important;
  font-weight: 600;
  padding: 16px;
  border-bottom: 2px solid var(--gold);
}

.table td {
  color: var(--text) !important;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.table tr:hover {
  background: var(--gray-50) !important;
}

/* التنبيهات */
.alert {
  background: var(--white) !important;
  border: 2px solid var(--gold) !important;
  color: var(--text) !important;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: var(--shadow-md);
}

.alert-success {
  border-color: var(--success) !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

.alert-warning {
  border-color: var(--warning) !important;
  background: rgba(245, 158, 11, 0.1) !important;
}

.alert-error {
  border-color: var(--error) !important;
  background: rgba(239, 68, 68, 0.1) !important;
}

.alert-info {
  border-color: var(--info) !important;
  background: rgba(59, 130, 246, 0.1) !important;
}

/* التبويبات */
.tabs {
  border-bottom: 2px solid var(--gold);
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.tab {
  background: transparent !important;
  color: var(--text) !important;
  border: none;
  padding: 12px 24px;
  margin-right: 8px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.tab:hover {
  background: var(--gray-100) !important;
  color: var(--text) !important;
}

.tab.active {
  background: var(--gold) !important;
  color: var(--black) !important;
}

/* أزرار رفع الملفات */
.file-upload-field {
  background: var(--white) !important;
  border: 2px dashed var(--gold) !important;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: var(--text) !important;
  transition: all 0.3s ease;
}

.file-upload-field:hover {
  border-color: var(--gold-dark) !important;
  background: var(--gray-50) !important;
}

.file-upload-field.dragover {
  border-color: var(--primary) !important;
  background: rgba(33, 128, 141, 0.1) !important;
}

/* أزرار الكاميرا */
.camera-btn {
  background: var(--black) !important;
  color: var(--white) !important;
  border: 2px solid var(--black) !important;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.camera-btn:hover {
  background: var(--gray-800) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
}

/* الصور المعروضة */
.uploaded-image {
  border: 2px solid var(--gold) !important;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  max-width: 100%;
  height: auto;
}

/* التحميل */
.loading {
  color: var(--text) !important;
}

.loading::after {
  border-color: var(--gold) transparent transparent transparent !important;
}

/* النصوص */
h1, h2, h3, h4, h5, h6 {
  color: var(--text) !important;
  font-weight: 700;
}

p {
  color: var(--text-muted) !important;
}

a {
  color: var(--primary) !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary-dark) !important;
  text-decoration: underline;
}

/* الروابط في البار */
.navbar a, .header a, .top-bar a {
  color: var(--white) !important;
}

.navbar a:hover, .header a:hover, .top-bar a:hover {
  color: var(--gold-light) !important;
}

/* إزالة جميع تأثيرات الثيمات القديمة */
.theme-dark *,
.theme-light *,
[data-theme="dark"] *,
[data-theme="light"] * {
  /* إعادة تعيين جميع الخصائص */
  background: inherit !important;
  color: inherit !important;
  border-color: inherit !important;
}

/* التأكد من أن جميع العناصر تستخدم الثيم الموحد */
* {
  box-sizing: border-box;
}

/* إزالة أزرار تغيير الثيم */
#themeToggle,
[data-action="toggle-theme"],
.theme-toggle {
  display: none !important;
}

/* إزالة أزرار تغيير اللغة */
#langToggle,
[data-action="toggle-lang"],
.lang-toggle {
  display: none !important;
}

/* التأكد من أن النصوص واضحة */
.text-white {
  color: var(--white) !important;
}

.text-black {
  color: var(--black) !important;
}

.text-gold {
  color: var(--gold) !important;
}

.text-red {
  color: var(--red) !important;
}

/* الخلفيات */
.bg-white {
  background: var(--white) !important;
}

.bg-black {
  background: var(--black) !important;
}

.bg-gold {
  background: var(--gold) !important;
}

.bg-red {
  background: var(--red) !important;
}

/* الحدود */
.border-gold {
  border-color: var(--gold) !important;
}

.border-red {
  border-color: var(--red) !important;
}

/* الظلال */
.shadow-gold {
  box-shadow: var(--shadow-gold) !important;
}

/* الاستجابة */
@media (max-width: 768px) {

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .form-control {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* إزالة جميع الثيمات القديمة نهائياً */
.theme-dark,
.theme-light,
[data-theme="dark"],
[data-theme="light"] {
  /* لا توجد تغييرات - ثيم موحد فقط */
}

/* تحسينات إضافية للتصميم */
.section {
  padding: 24px 16px;
}

.hero-ctas, .landing-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* تحسينات للمستندات */
#docs-uploader {
  display: grid;
  gap: 12px;
}

.doc-item {
  border: 1px dashed var(--border-color, #d1d5db);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface, #fff);
}

.doc-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.doc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.doc-preview img {
  max-height: 90px;
  border-radius: 8px;
}

.doc-error {
  color: #c00;
  font-size: .9rem;
  margin-top: 4px;
}

/* تحسينات للتحميل */
.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* حاوية الهيرو */
.hero, .hero-section, .landing-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 24px 16px;
  background-position: center;
  background-size: cover;
}

/* تصغير وتوسيط اللوجو */
#hero-logo {
  display: block;
  width: 40px;
  height: 40px;
  margin-inline: auto;
  object-fit: contain;
}

/* لو اللوجو داخل غلاف */
.logo, .brand, .hero-logo-wrap, .card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* مسافة تحت اللوجو قبل الأزرار */
.hero-ctas, .landing-ctas {
  margin-top: 16px;
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* إزالة الأنماط المتعارضة */
.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.card-description {
  color: #666;
  line-height: 1.6;
  margin: 16px 0;
}

/* خلفية الموقع - تطبيق شامل */
:root {
  --site-bg: url("/assets/images/backgrounds/screen-1.png");
  --card-bg: rgba(255, 255, 255, 0.95);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تطبيق الخلفية على جميع الصفحات */
body,
.unified-signup,
.auth,
.choose-role,
.choose-platform,
.index,
.dashboard {
  background-image: var(--site-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

/* إزالة اللوجو الضخم */
.hero-logo,
#hero-logo,
.large-logo,
.central-logo {
  display: none !important;
}

/* إخفاء أي لوجو كبير في المحتوى */
.hero .logo,
.hero img[alt*="LUXBYTE"],
.hero img[src*="logo"],
.hero img[src*="LUXBYTE"] {
  display: none !important;
}

/* كروت عائمة احترافية */
.card, .panel, .box, .content-card, .form-container, .signup-form, .auth-form {
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  margin: 20px auto;
  overflow: hidden;
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 10;
}

.card:hover, .panel:hover, .box:hover, .content-card:hover, .form-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* تحسين محتوى الكروت */
.card .card-header, .panel .panel-header {
  background: linear-gradient(135deg, rgba(107, 124, 255, 0.1), rgba(122, 60, 255, 0.1));
  border-bottom: 1px solid rgba(107, 124, 255, 0.2);
  padding: 24px;
  margin: 0;
}

.card .card-title, .panel .panel-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
  text-align: center;
}

.card .card-description, .panel .panel-description {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  text-align: center;
  padding: 0 16px 16px;
}

/* إزالة التعارضات - تطبيق الأنماط الجديدة */
.card .card-header {
  background: linear-gradient(135deg, rgba(107, 124, 255, 0.1), rgba(122, 60, 255, 0.1)) !important;
  border-bottom: 1px solid rgba(107, 124, 255, 0.2) !important;
  margin: 0;
  padding: 24px;
}

.card .card-description {
  padding: 0 16px 16px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #6b7280;
  text-align: center;
}

/* إصلاح مشاكل التخطيط */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* إصلاح مشاكل الاستجابة */
@media (max-width: 768px) {
  .card, .panel, .box, .content-card, .form-container, .signup-form, .auth-form {
    margin: 8px 0;
    padding: 16px;
    max-width: 100%;
  }

  .card .card-header, .panel .panel-header {
    padding: 12px;
  }

  .card .card-description, .panel .panel-description {
    padding: 0 12px 12px;
    font-size: 13px;
  }
}

/* تحسين الهيدر */
.site-header, .header, .top-bar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

/* إزالة الأنماط المتعارضة للهيدر */
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header .auth-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* صغّر اللوجو وثبّته في الركن بدون ما يغطي العناصر */
#bg-corner-logo{
  position: fixed;
  top: 18px;
  right: 18px;
  width: clamp(72px, 10vw, 140px);
  height: auto;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}

@media (max-width:480px){
  #bg-corner-logo{
    top: 12px;
    right: 12px;
    width: 88px;
  }
}

/* Document uploader styles */
#docs-uploader {
  display: grid;
  gap: 12px;
}

.doc-item {
  border: 1px dashed var(--border-color, #d1d5db);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface, #fff);
}

.doc-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.doc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.doc-preview img {
  max-height: 90px;
  border-radius: 8px;
}

.doc-error {
  color: #c00;
  font-size: .9rem;
  margin-top: 4px;
}

.is-loading::after {
  content: "جاري التحميل...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
}

/* التأكد من أن جميع العناصر تستخدم الألوان الصحيحة */
* {
  /* إعادة تعيين أي ألوان قديمة */
  --bg-body: var(--white);
  --bg-card: var(--white);
  --text: var(--black);
  --text-muted: var(--gray-700);
}