:root {
  --navy: #14213D;
  --navy-900: #0c1324;
  --gold: #F2A93B;
  --cream: #F7F4EE;
  --line: #e6e2d8;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
}
[x-cloak] { display: none !important; }

body {
  font-family: "Tajawal", "SF Arabic", "Geeza Pro", "Segoe UI", "Arial", sans-serif;
  background: #f6f4ef;
  color: #1b2233;
  text-rendering: optimizeLegibility;
}

.glass-header {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #d7deea;
  font-size: 14px;
  transition: 0.18s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(242, 169, 59, 0.14);
  color: #fff;
}

.card-soft {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(20, 33, 61, 0.04);
}

.badge-slate { background: #eef2f7; color: #334155; }
.badge-sky { background: #e0f2fe; color: #0369a1; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-emerald { background: #d1fae5; color: #065f46; }
.badge-rose { background: #ffe4e6; color: #9f1239; }
.badge-violet { background: #ede9fe; color: #5b21b6; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.btn-primary {
  background: #14213D;
  color: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.18s ease;
}
.btn-primary:hover { background: #0f1a31; }

.btn-gold {
  background: #F2A93B;
  color: #14213D;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-gold:hover { filter: brightness(0.96); }

.btn-ghost {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 700;
  color: #14213D;
}

.field {
  width: 100%;
  border: 1px solid #e4dfd4;
  background: #fff;
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
}
.field:focus {
  border-color: #F2A93B;
  box-shadow: 0 0 0 4px rgba(242, 169, 59, 0.16);
}

.hero-grid {
  background-color: #14213D;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(242, 169, 59, 0.22), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(160deg, #0f1a31 0%, #14213D 55%, #1b2d52 100%);
}

.table-wrap { overflow-x: auto; }
.table-wrap table { min-width: 640px; }

.kanban-col {
  min-height: 280px;
}

.toast-enter { animation: toastIn 0.35s ease; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.m2-signature {
  --m2-sig-text: #F6F3EA;
  --m2-sig-accent: #F2A93B;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  letter-spacing: 0.2px;
  text-align: center;
}

.m2-signature--on-light {
  --m2-sig-text: #14213D;
  --m2-sig-accent: #F2A93B;
  border-top-color: rgba(0, 0, 0, 0.12);
}

.m2-signature--compact {
  margin-top: 12px;
  padding-top: 14px;
  gap: 8px;
}

.m2-signature__logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.m2-signature__logo:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.m2-signature__logo img {
  height: 18px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
}

.m2-signature--compact .m2-signature__logo img {
  height: 16px;
}

.m2-signature__mark {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--m2-sig-accent);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--m2-sig-accent) 55%, transparent));
  animation: m2-sig-pulse 3.4s ease-in-out infinite;
}

.m2-signature__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes m2-sig-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.12) rotate(45deg); opacity: 1; }
}

.m2-signature__tag,
.m2-signature__tag strong {
  color: var(--m2-sig-text);
  font-size: 13px;
}

.m2-signature__year {
  color: color-mix(in srgb, var(--m2-sig-text) 78%, transparent);
  font-size: 13px;
}

.m2-signature--compact .m2-signature__tag,
.m2-signature--compact .m2-signature__tag strong,
.m2-signature--compact .m2-signature__year {
  font-size: 11px;
}

@media (max-width: 575px) {
  .m2-signature { gap: 8px 10px; }
}

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
