:root {
  --color-navy-950: #05070f;
  --color-navy-900: #080b18;
  --color-navy-800: #0d1326;
  --color-navy-700: #131b34;
  --color-navy-600: #1a2540;

  --color-accent: #00d9ff;
  --color-accent-2: #2f6bff;
  --color-accent-rgb: 0, 217, 255;
  --color-accent-soft: rgba(0, 217, 255, 0.14);

  --color-text: #e7edf7;
  --color-muted: #8a96b3;

  --color-card-bg: rgba(13, 19, 38, 0.65);
  --color-border: rgba(0, 217, 255, 0.18);
  --color-input-bg: rgba(255, 255, 255, 0.04);

  --radius: 16px;
  --shadow-card: 0 25px 70px rgba(0, 0, 0, 0.55), 0 0 60px rgba(0, 217, 255, 0.08);

  /* Mirror into Tabler's own custom properties (see admin.css for the same
     pattern) so the login page's .btn-primary/.card use the same cyan accent. */
  --tblr-primary: var(--color-accent);
  --tblr-primary-rgb: var(--color-accent-rgb);
  --tblr-primary-fg: #ffffff;
  --tblr-primary-darken: color-mix(in srgb, var(--color-accent) 85%, black);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
  position: relative;
  overflow: hidden;
  background: var(--color-navy-950);
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(0, 217, 255, 0.16), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(47, 107, 255, 0.18), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(0, 217, 255, 0.12), transparent 55%),
    linear-gradient(135deg, var(--color-navy-950), var(--color-navy-800) 45%, var(--color-navy-900) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 18s ease-in-out infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#particles-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-page {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tabler's .card supplies background/border/radius/padding now; this just
   layers the app's glassy blur + glow on top of it. */
.login-card {
  background: var(--color-card-bg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  margin-bottom: 32px;
  text-align: center;
}

.brand-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #051018;
  font-weight: 900;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(0, 217, 255, 0.45);
}

.brand-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--color-text);
  margin: 0 0 8px;
  text-shadow: 0 0 20px rgba(0, 217, 255, 0.25);
}

.brand-subtitle {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-muted);
  margin: 0;
}

.login-form {
  text-align: right;
}

/* Field/input styling now comes from Tabler's .form-label/.form-control;
   only the password-toggle button needs its own look (Tabler's
   .input-group-text just positions it). */
.toggle-password {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
  line-height: 1;
  color: var(--color-muted);
}

.toggle-password:hover {
  color: var(--color-accent);
}

.login-error {
  margin: -4px 0 0;
  text-align: center;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

/* Tabler's .btn-primary already tracks the theme accent (--tblr-primary);
   this just adds the hover-lift animation the app's other buttons use. */
.btn-login {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-login:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-forgot {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-forgot:hover {
  color: #6ce8ff;
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px;
  }

  .brand-title {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}
