/* =============================================
   LOGIN PAGE — كاشير الأصول  (rebuilt)
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:      #3db8a8;
  --gold:      #c9a84c;
  --bg-card:   rgba(18, 38, 52, 0.95);
  --border:    rgba(61,184,168,0.22);
  --text:      #e9f2f7;
  --muted:     #8fafc0;
  --danger:    #ff8080;
  --font:      'Cairo', 'Tajawal', sans-serif;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font);
  color: var(--text);
  direction: rtl;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(61,184,168,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(201,168,76,0.12) 0%, transparent 50%),
    linear-gradient(150deg, #07101a 0%, #0d1d2c 50%, #081219 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 55%, rgba(119,207,255,0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 25%, rgba(255,255,255,0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 65% 75%, rgba(61,184,168,0.6) 0 1px, transparent 2px),
    radial-gradient(circle at 22% 88%, rgba(255,255,255,0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 90% 50%, rgba(201,168,76,0.5) 0 1px, transparent 2px);
  background-size: 300px 300px, 400px 400px, 350px 350px, 380px 380px, 270px 270px, 320px 320px;
  opacity: 0.55;
  animation: starDrift 50s linear infinite;
  z-index: 0;
}

@keyframes starDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 300px 300px, -400px 200px, 200px -300px, -380px 380px, 270px -270px, -320px 320px; }
}

/* Shell */
.staff-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 24px;
}

/* Brand Hero */
.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
}

.login-hero-logo {
  width: 72px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.login-hero-title {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}

.login-hero-title .brand-teal { color: var(--teal); }

.login-hero-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
}

/* Card */
.staff-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow:
    0 0 0 1px rgba(61,184,168,0.06),
    0 20px 60px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: cardIn 0.5s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card header */
.staff-brand {
  text-align: center;
  margin-bottom: 20px;
}

.staff-brand h1 {
  font-size: clamp(17px, 4vw, 20px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.staff-brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.staff-ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: rgba(61,184,168,0.12);
  border: 1px solid rgba(61,184,168,0.3);
  color: #d0f4ee;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
}

.staff-ai-chip i { color: var(--teal); font-size: 11px; }

/* Form */
.staff-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.staff-form input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 16px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.staff-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(61,184,168,0.2);
}

.staff-error {
  min-height: 16px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
}

/* Buttons */
.staff-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.staff-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 10px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--teal);
  background: linear-gradient(135deg, rgba(61,184,168,0.25), rgba(61,184,168,0.1));
  color: #d0f8f0;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.staff-login-btn:active { transform: scale(0.97); }

.staff-login-btn.alt {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
  .staff-shell { padding: 24px 16px; gap: 20px; }
  .login-hero-logo { width: 60px; }
  .staff-card { padding: 22px 16px 20px; border-radius: 16px; }
  .staff-actions { grid-template-columns: 1fr; }
  .staff-login-btn, .staff-login-btn.alt { font-size: 15px; padding: 14px 10px; }
}
