﻿/* ═══════════════════════════════════════════════════════════════
   Aum Holistic — Design Tokens & Utilities
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@700;800&family=Tajawal:wght@400;500;700&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600&family=Inter:wght@400;500&display=swap');

/* ─── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Forest green — matched to logo's hunter-green palette */
  --sage-900: #1B3A28;
  --sage-700: #295440;
  --sage-500: #4B7C5A;
  --sage-100: #E2EEE5;

  /* Sand — warmer cream matching logo background */
  --sand-50:  #F8F3E8;
  --sand-200: #EDE4CE;

  /* Accent — champagne gold matching logo figure, warm terracotta */
  --amber-600: #C4A052;
  --clay-500:  #C97A5D;

  /* Ink */
  --ink-900: #1A1A1A;
  --ink-500: #6B6B6B;

  /* Typography stacks */
  --font-arabic:  'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-ui:      'Inter', 'Cairo', sans-serif;

  /* Radii */
  --r-sm:  6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Shadows — tinted with forest green */
  --sh-xs: 0 1px 2px rgba(27,58,40,0.06);
  --sh-sm: 0 1px 4px rgba(27,58,40,0.09);
  --sh-md: 0 4px 16px rgba(27,58,40,0.10);
  --sh-lg: 0 8px 32px rgba(27,58,40,0.14);

  /* Sidebar width */
  --sidebar-w: 260px;
}

/* ─── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

html[dir="rtl"] {
  font-family: var(--font-arabic);
  text-align: right;
}

body {
  background-color: var(--sand-50);
  color: var(--ink-900);
  font-family: var(--font-arabic);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--sand-50); }
::-webkit-scrollbar-thumb { background: var(--sage-500); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage-700); }

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

/* ─── Card ────────────────────────────────────────────────────── */
.aum-card {
  background: #ffffff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  border: 1px solid var(--sand-200);
  padding: 1.5rem;
}

.aum-card-hover {
  transition: box-shadow 0.2s, transform 0.2s;
}
.aum-card-hover:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.aum-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  background: var(--sage-700);
  color: #ffffff;
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
  box-shadow: 0 2px 6px rgba(41,84,64,0.25);
}
.aum-btn-primary:hover  { background: var(--sage-900); box-shadow: 0 4px 12px rgba(41,84,64,0.30); }
.aum-btn-primary:active { transform: scale(0.97); }

.aum-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  background: transparent;
  color: var(--sage-700);
  border: 1.5px solid var(--sage-500);
  border-radius: var(--r-sm);
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s;
}
.aum-btn-secondary:hover {
  background: var(--sage-100);
  border-color: var(--sage-700);
}

.aum-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: transparent;
  color: var(--ink-500);
  border: none;
  border-radius: var(--r-sm);
  font-family: var(--font-arabic);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.aum-btn-ghost:hover { background: var(--sand-200); color: var(--ink-900); }

.aum-btn-danger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.625rem 1.375rem;
  background: #dc2626; color: #fff;
  border: none; border-radius: var(--r-sm);
  font-family: var(--font-arabic); font-size: 0.9rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background 0.18s;
}
.aum-btn-danger:hover { background: #b91c1c; }

/* ─── Inputs ──────────────────────────────────────────────────── */
.aum-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: #fff;
  color: var(--ink-900);
  border: 1.5px solid var(--sand-200);
  border-radius: var(--r-sm);
  font-family: var(--font-arabic);
  font-size: 0.925rem;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.aum-input:focus {
  border-color: var(--sage-500);
  box-shadow: 0 0 0 3px rgba(92,138,126,0.15);
}
.aum-input::placeholder { color: var(--ink-500); opacity: 0.7; }

.aum-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: #fff;
  color: var(--ink-900);
  border: 1.5px solid var(--sand-200);
  border-radius: var(--r-sm);
  font-family: var(--font-arabic);
  font-size: 0.925rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-left: 2.25rem;
  transition: border-color 0.18s;
}
.aum-select:focus { border-color: var(--sage-500); }

html[dir="rtl"] .aum-select {
  background-position: right 0.75rem center;
  padding-left: 0.875rem;
  padding-right: 2.25rem;
}

/* ─── Label ───────────────────────────────────────────────────── */
.aum-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 0.4rem;
}

/* ─── Pill / Tag ──────────────────────────────────────────────── */
.aum-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--sage-100);
  color: var(--sage-900);
  white-space: nowrap;
}
.aum-pill-amber { background: #fef3c7; color: #92400e; }
.aum-pill-clay  { background: #fce7e0; color: #9a3412; }
.aum-pill-blue  { background: #dbeafe; color: #1e40af; }
.aum-pill-gray  { background: var(--sand-200); color: var(--ink-900); }

/* ─── Badge ───────────────────────────────────────────────────── */
.aum-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.aum-badge-success { background: #d1fae5; color: #065f46; }
.aum-badge-warning { background: #fef3c7; color: #92400e; }
.aum-badge-error   { background: #fee2e2; color: #991b1b; }
.aum-badge-info    { background: #dbeafe; color: #1e40af; }
.aum-badge-neutral { background: var(--sand-200); color: var(--ink-500); }
.aum-badge-sage    { background: var(--sage-100); color: var(--sage-900); }
.aum-badge-amber   { background: #fef3c7; color: #92400e; }

/* ─── Divider ─────────────────────────────────────────────────── */
.aum-divider {
  border: none;
  border-top: 1px solid var(--sand-200);
  margin: 1.25rem 0;
}

/* ─── Page Layout Helpers ─────────────────────────────────────── */
.aum-page-wrap {
  display: flex;
  min-height: 100vh;
}
.aum-main-content {
  flex: 1;
  min-width: 0;
  padding: 2rem;
  margin-inline-start: var(--sidebar-w);
}

.aum-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.aum-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sage-900);
  line-height: 1.2;
}
.aum-page-subtitle {
  font-size: 0.9rem;
  color: var(--ink-500);
  margin-top: 0.2rem;
}

/* ─── Stat Card ───────────────────────────────────────────────── */
.aum-stat-card {
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--sand-200);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.aum-stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.aum-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--sage-900); line-height: 1; }
.aum-stat-label { font-size: 0.82rem; color: var(--ink-500); margin-top: 0.3rem; }
.aum-stat-delta { font-size: 0.8rem; font-weight: 700; margin-top: 0.4rem; }
.aum-stat-delta-up   { color: #059669; }
.aum-stat-delta-down { color: #dc2626; }

/* ─── Table ───────────────────────────────────────────────────── */
.aum-table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--sand-200); background: #fff; }
.aum-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.aum-table th {
  padding: 0.75rem 1rem;
  background: var(--sand-50);
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--sand-200);
  white-space: nowrap;
}
.aum-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--sand-200);
  vertical-align: middle;
}
.aum-table tr:last-child td { border-bottom: none; }
.aum-table tbody tr { transition: background 0.12s; }
.aum-table tbody tr:hover { background: var(--sand-50); }

/* ─── Avatar ──────────────────────────────────────────────────── */
.aum-avatar {
  width: 36px; height: 36px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--sage-100);
  flex-shrink: 0;
}
.aum-avatar-lg { width: 56px; height: 56px; }
.aum-avatar-xl { width: 80px; height: 80px; }

/* ─── Empty State ─────────────────────────────────────────────── */
.aum-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--ink-500);
}
.aum-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; }
.aum-empty h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--ink-900); }
.aum-empty p  { font-size: 0.875rem; }

/* ─── Form Group ──────────────────────────────────────────────── */
.aum-form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.aum-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.aum-form-error { font-size: 0.8rem; color: #dc2626; margin-top: 0.25rem; }

/* ─── Progress Bar ────────────────────────────────────────────── */
.aum-progress-track {
  width: 100%; height: 6px;
  background: var(--sand-200);
  border-radius: 999px;
  overflow: hidden;
}
.aum-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage-700), var(--sage-500));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ─── Sidebar (shared base) ───────────────────────────────────── */
.aum-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar-w);
  background: var(--sage-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 40;
  overflow-y: auto;
}
.aum-sidebar-logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 0.875rem;
}
.aum-sidebar-logo img { width: 36px; height: 36px; }
.aum-sidebar-logo-text { font-size: 1rem; font-weight: 800; line-height: 1.2; }
.aum-sidebar-logo-sub  { font-size: 0.72rem; opacity: 0.55; }
.aum-sidebar-nav { flex: 1; padding: 1rem 0; }
.aum-sidebar-section-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.4;
  padding: 1rem 1.25rem 0.4rem;
}
.aum-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem; font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.aum-nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.aum-nav-item.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
}
.aum-nav-item.active::before {
  content: '';
  position: absolute;
  inset-inline-start: 0; inset-block: 0;
  width: 3px;
  background: var(--amber-600);
  border-radius: 0 2px 2px 0;
}
.aum-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.aum-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ─── Top Header ──────────────────────────────────────────────── */
.aum-topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251,248,243,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand-200);
  padding: 0.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-inline-start: var(--sidebar-w);
}
.aum-topbar-search {
  flex: 1; max-width: 360px;
  position: relative;
}
.aum-topbar-search input {
  width: 100%; padding: 0.5rem 0.875rem 0.5rem 2.5rem;
  background: #fff;
  border: 1.5px solid var(--sand-200);
  border-radius: 999px;
  font-size: 0.875rem;
  font-family: var(--font-arabic);
  outline: none;
  transition: border-color 0.18s;
}
.aum-topbar-search input:focus { border-color: var(--sage-500); }
.aum-topbar-search .search-icon {
  position: absolute;
  inset-inline-start: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-500); pointer-events: none;
}
html[dir="rtl"] .aum-topbar-search input { padding-right: 2.5rem; padding-left: 0.875rem; }
html[dir="rtl"] .aum-topbar-search .search-icon { right: 0.75rem; left: auto; }

/* ─── Modal ───────────────────────────────────────────────────── */
.aum-modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(26,26,26,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.aum-modal {
  background: #fff;
  border-radius: var(--r-lg);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--sh-lg);
}
.aum-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--sand-200);
}
.aum-modal-title { font-size: 1.1rem; font-weight: 800; color: var(--sage-900); }
.aum-modal-body  { padding: 1.5rem 1.75rem; }
.aum-modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  display: flex; gap: 0.75rem; justify-content: flex-end;
  border-top: 1px solid var(--sand-200);
}
