/* مصرف الأمان — ألوان ومكونات مستخرجة من البناء الأصلي */
:root {
  --jt: #1a3a7a;
  --jy: #1e4db7;
  --gl: #c8970a;
  --kr: #f5d06e;
  --bg-page: #ffffff;
  --text-muted: #94a3b8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", sans-serif;
  background: hsl(0, 0%, 100%);
  color: #1a202c;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* أنيميشن من الأصل */
@keyframes ab-float {
  0%,
  100% {
    transform: translateY(0) rotate(0) scale(1);
  }
  33% {
    transform: translateY(-16px) rotate(5deg) scale(1.04);
  }
  66% {
    transform: translateY(-8px) rotate(-3deg) scale(0.97);
  }
}

@keyframes ab-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ab-shimmer {
  0% {
    background-position: -300% 0;
  }
  100% {
    background-position: 300% 0;
  }
}

@keyframes ab-pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(200, 151, 10, 0.45), 0 4px 24px rgba(200, 151, 10, 0.2);
  }
  50% {
    box-shadow: 0 0 48px #c8970a, 0 8px 48px rgba(200, 151, 10, 0.5);
  }
}

@keyframes ab-slide-up {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ab-scale-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ab-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.88);
  }
  70% {
    opacity: 0.1;
    transform: scale(1.1);
  }
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
}

@keyframes ab-dot {
  0%,
  80%,
  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-12px);
  }
}

@keyframes ab-orb-drift {
  0%,
  100% {
    transform: translate(0) scale(1);
  }
  25% {
    transform: translate(10px, -15px) scale(1.06);
  }
  50% {
    transform: translate(-5px, -25px) scale(0.94);
  }
  75% {
    transform: translate(-12px, -10px) scale(1.02);
  }
}

@keyframes ab-star-twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.3);
  }
}

.ab-float {
  animation: 7s ease-in-out infinite ab-float;
}

.ab-spin {
  animation: 22s linear infinite ab-spin;
}

.ab-slide-up {
  animation: 0.55s cubic-bezier(0.22, 1, 0.36, 1) both ab-slide-up;
}

.ab-scale-in {
  animation: 0.4s cubic-bezier(0.22, 1, 0.36, 1) both ab-scale-in;
}

.ab-pulse-glow {
  animation: 2.2s ease-in-out infinite ab-pulse-glow;
}

.ab-trophy-bounce {
  animation: 3s ease-in-out infinite ab-float;
}

.ab-shimmer-gold {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(
    90deg,
    #b8820a,
    #f5d06e,
    #e8b520,
    #f5d06e,
    #b8820a
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: 3.5s linear infinite ab-shimmer;
}

.ab-btn-gold {
  background: linear-gradient(90deg, #c8970a, #f5d06e, #e8b520 60%, #c8970a);
  background-size: 250% 100%;
  animation: 2.8s linear infinite ab-shimmer;
}

.ab-glass {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ab-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(26, 58, 122, 0.1), 0 1px 6px rgba(0, 0, 0, 0.05);
}

.ab-card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}

.ab-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(26, 58, 122, 0.16), 0 2px 8px rgba(0, 0, 0, 0.07);
}

.ab-input-field {
  margin-bottom: 20px;
  position: relative;
}

.ab-input-field input {
  text-align: right;
  color: #1a202c;
  background: #f6f8ff;
  border: none;
  border-bottom: 2px solid #dde4f0;
  border-radius: 12px 12px 0 0;
  outline: none;
  width: 100%;
  padding: 18px 16px 8px;
  font-family: Cairo, sans-serif;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.ab-input-field input:focus {
  background: #eef2ff;
  border-bottom-color: #1a3a7a;
}

.ab-input-field input::placeholder {
  color: #a0aec0;
  font-size: 13px;
}

.ab-input-field label {
  color: #1a3a7a;
  letter-spacing: 0.01em;
  pointer-events: none;
  font-family: Cairo, sans-serif;
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  top: 6px;
  right: 16px;
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-thumb {
  background: rgba(26, 58, 122, 0.25);
  border-radius: 2px;
}

/* تخطيط عام */
.aman-wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg-page);
}

.aman-nav {
  background: #fff;
  border-bottom: 1px solid #e8eef5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  direction: ltr;
  position: sticky;
  top: 0;
  z-index: 50;
}

.aman-nav img {
  height: 48px;
  width: auto;
}

.aman-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0d2660 0%, var(--jt) 40%, var(--jy) 70%, #2f63d4 100%);
  padding-bottom: 40px;
}

.aman-hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.aman-stats {
  display: flex;
  background: #fff;
  margin: 0 16px;
  border-radius: 20px;
  margin-top: -12px;
  padding: 16px 0;
  box-shadow: 0 4px 30px rgba(26, 58, 122, 0.12);
}

.aman-stats > div {
  flex: 1;
  text-align: center;
  border-left: 1px solid #eef2ff;
}

.aman-stats > div:last-child {
  border-left: none;
}

.aman-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 28px 8px;
  gap: 0;
}

.aman-stepper .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.aman-stepper .bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.aman-stepper .line {
  flex: 1;
  height: 1.5px;
  margin: 0 6px 16px;
  border-radius: 2px;
}

/* لوحة الإدارة (داكنة) */
.admin-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1117, #1c1e22, #0d1117);
  font-family: "Cairo", sans-serif;
}

.admin-card {
  width: 100%;
  max-width: 400px;
  margin: 0 24px;
  background: rgba(35, 38, 41, 0.95);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  padding: 40px 36px;
}

.admin-dash {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  min-height: 100vh;
  background: #181a1d;
  color: #e2e8f0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
  color: #94a3b8;
  font-weight: 700;
}

@keyframes ab-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(6px);
  }
}

.ab-shake {
  animation: ab-shake 0.4s ease;
}
