/* ADAALA-CV — Design system utilities (Stitch / Digital Curator) */
[x-cloak] { display: none !important; }

:root {
  /* مرجع التصميم: أزرق بنفسجي قريب من Indigo-600 */
  --ada-primary: #4f46e5;
  --ada-primary-container: #6366f1;
  --ada-dashboard-bg: #f8f9fd;
  --ada-dashboard-accent: #6366f1;
  --ada-surface: #faf8ff;
  --ada-on-surface: #131b2e;
  --ada-on-surface-variant: #464554;
  --ada-surface-container-low: #f2f3ff;
  --ada-surface-container-high: #e2e7ff;
  --ada-outline-variant: #c7c4d7;
  --ada-tertiary-fixed: #ffdcc5;
  --ada-on-tertiary-fixed-variant: #703700;
  --ada-shadow-ambient: 0 12px 32px rgba(19, 27, 46, 0.06);
}

body {
  font-family: 'Cairo', sans-serif;
  color: var(--ada-on-surface);
  background-color: var(--ada-surface);
  direction: rtl;
  text-align: start;
}

/* Smooth transitions */
.view-enter { animation: fadeSlideIn 0.2s ease-out; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* RTL scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #c7c4d7; border-radius: 3px; }

/* Material Symbols alignment */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  line-height: 1;
  direction: ltr;
}

/* Glass / elevation */
.ada-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.ada-shadow-ambient { box-shadow: var(--ada-shadow-ambient); }

/* Cards — tonal layering, minimal borders */
.ada-card {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: var(--ada-shadow-ambient);
}
.ada-card-muted {
  background: #f2f3ff;
  border-radius: 0.75rem;
  box-shadow: var(--ada-shadow-ambient);
}

/* Form inputs — modern soft border, layered focus */
.ada-input {
  width: 100%;
  border: 1.5px solid rgba(199, 196, 215, 0.45);
  border-radius: 0.75rem;
  background-color: rgba(242, 243, 255, 0.35);
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  color: var(--ada-on-surface);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.ada-input:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background-color: rgba(242, 243, 255, 0.55);
}
.ada-input:focus {
  outline: none;
  border-color: #6366f1;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 1px 3px rgba(19, 27, 46, 0.06);
}
.ada-input::placeholder { color: #9ca3af; }
select.ada-input {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-inline-start: 2rem;
}
textarea.ada-input { resize: vertical; }

/* Buttons */
.ada-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.28);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.ada-btn-primary:hover { transform: scale(1.02); opacity: 0.95; }
.ada-btn-primary:disabled { opacity: 0.5; transform: none; }

.ada-btn-ghost {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  color: #4f46e5;
  border: 1px solid rgba(199, 196, 215, 0.35);
  background: transparent;
  transition: background-color 0.2s;
}
.ada-btn-ghost:hover { background-color: rgba(79, 70, 229, 0.08); }

/* AI insight strip */
.ada-ai-tip {
  background: rgba(255, 220, 197, 0.45);
  backdrop-filter: blur(8px);
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 180, 140, 0.35);
}

/* Sidebar link */
.ada-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  color: #626567;
  transition: transform 0.15s ease, background-color 0.2s;
}
.ada-nav-link:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: scale(1.01);
}
.ada-nav-link-active {
  background: rgba(255, 255, 255, 0.92);
  color: #6366f1;
  font-weight: 600;
  border-inline-start: 4px solid var(--ada-primary);
  box-shadow: none;
}

/* لوحة التحكم — خلفية الصفحة */
.ada-dashboard-page {
  background-color: var(--ada-dashboard-bg);
  min-height: 100%;
}

/* Content wrapper: sidebar offset handled once, not per-element */
.ada-content-wrap {
  min-height: 100dvh;
  min-width: 0;
  overflow-x: hidden;
}
@media (min-width: 768px) {
  .ada-content-wrap {
    transition: margin-inline-start 300ms ease, width 300ms ease;
  }
  .ada-has-sidebar > .ada-content-wrap {
    margin-inline-start: 17rem;
    width: calc(100% - 17rem);
  }
}

/* بطاقات إحصائيات لوحة التحكم */
.ada-dash-stat-ai {
  background: linear-gradient(135deg, #fff4ed 0%, #ffe8d9 100%);
  border: 1px solid rgba(255, 140, 90, 0.2);
}
.ada-dash-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(19, 27, 46, 0.06);
  border: 1px solid rgba(199, 196, 215, 0.35);
}

/* بطاقة سيرة في الشبكة */
.ada-dash-cv-card {
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(19, 27, 46, 0.06);
  border: 1px solid rgba(199, 196, 215, 0.3);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.ada-dash-cv-card:hover {
  box-shadow: 0 14px 36px rgba(19, 27, 46, 0.1);
}
.ada-dash-new-card {
  border: 2px dashed rgba(70, 72, 212, 0.35);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.6);
}

/* لوحة تحكم — شريط تنقل أفقي (نمط الصورة) */
.ada-dash-v2 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
}
.ada-dash-nav-shell {
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 14px rgba(19, 27, 46, 0.06);
  border: 1px solid rgba(199, 196, 215, 0.35);
}
.ada-dash-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #5c5f61;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.ada-dash-nav-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #6366f1;
}
.ada-dash-nav-link-active {
  background: #e8ecff;
  color: #6366f1;
}
.ada-dash-quick-actions {
  background: linear-gradient(165deg, #6b7cff 0%, #4648d4 55%, #3a3cb8 100%);
  border-radius: 1.25rem;
  box-shadow: 0 10px 28px rgba(70, 72, 212, 0.28);
}

/* Tables — mobile scroll */
.ada-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0.75rem;
  box-shadow: var(--ada-shadow-ambient);
}

/* Loading spinner */
.spinner {
  border: 3px solid #e2e7ff;
  border-top-color: #6366f1;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-enter { animation: toastIn 0.3s ease-out; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }

/* CV Builder sections */
.cv-section { transition: box-shadow 0.15s; }
.cv-section:focus-within { box-shadow: 0 0 0 2px rgba(70, 72, 212, 0.45); }

/* Status badges */
.badge-draft     { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-applied   { background: #dbeafe; color: #1e40af; }
.badge-interview { background: #ede9fe; color: #5b21b6; }
.badge-offer     { background: #d1fae5; color: #065f46; }
.badge-rejected  { background: #fee2e2; color: #991b1b; }
.badge-withdrawn { background: #f3f4f6; color: #374151; }

/* No scrollbar helper (tabs) */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
