@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #05090d;
  --panel: rgba(9, 18, 26, .95);
  --panel-2: rgba(13, 25, 36, .96);
  --line: rgba(127, 160, 193, .2);
  --text: #f6fbff;
  --muted: #8190a5;
  --muted-strong: #b8c6d8;
  --teal: #24d6c2;
  --blue: #2d8cff;
  --red: #ff4e4e;
  --radius: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  background:
    linear-gradient(rgba(117, 160, 198, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 160, 198, .035) 1px, transparent 1px),
    radial-gradient(circle at 68% 0%, rgba(36,214,194,.12), transparent 32%),
    linear-gradient(135deg, var(--bg) 0%, #071018 58%, #03070b 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(45,140,255,.08), transparent 38%, rgba(36,214,194,.08));
}
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
}
.login-card {
  width: min(450px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: 0 32px 90px rgba(0,0,0,.44);
  backdrop-filter: blur(18px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  direction: ltr;
}
.logo-frame {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(36,214,194,.36);
}
.logo-frame img { width: 52px; height: 52px; object-fit: contain; }
.brand p {
  margin: 0;
  color: var(--muted);
  font: 700 9px/1 'Space Grotesk', sans-serif;
  letter-spacing: .16em;
}
.brand h1 {
  margin: 5px 0 0;
  color: #fff;
  font: 700 22px/1 'Space Grotesk', sans-serif;
  letter-spacing: 0;
}
.lock {
  width: 54px;
  height: 54px;
  margin: 34px 0 16px auto;
  display: grid;
  place-items: center;
  color: var(--teal);
  border: 1px solid rgba(36,214,194,.3);
  border-radius: var(--radius);
  background: rgba(36,214,194,.12);
  box-shadow: inset 0 0 18px rgba(36,214,194,.08);
}
.lock svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h2 {
  margin: 0 0 6px;
  font-size: 27px;
  line-height: 1.35;
}
.intro {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
label {
  display: block;
  margin: 14px 0 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}
input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
  direction: ltr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  background: rgba(3,8,13,.82);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus {
  border-color: rgba(36,214,194,.62);
  box-shadow: 0 0 0 3px rgba(36,214,194,.1);
  background: rgba(3,8,13,.96);
}
.error {
  min-height: 20px;
  margin: 9px 0 3px;
  color: var(--red);
  font-size: 12px;
}
button {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #02110f;
  font: 700 14px 'IBM Plex Sans Arabic', system-ui, sans-serif;
  border: 1px solid rgba(36,214,194,.42);
  border-radius: var(--radius);
  cursor: pointer;
  background: linear-gradient(135deg, var(--teal), #63d7ff);
  box-shadow: 0 14px 34px rgba(36,214,194,.18);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(36,214,194,.24);
}
button:disabled { opacity: .65; cursor: wait; transform: none; }
button.loading i { animation: move .8s ease-in-out infinite alternate; }
@keyframes move { to { transform: translateX(-6px); } }
footer {
  margin-top: 24px;
  padding-top: 17px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
  direction: ltr;
  font: 700 10px 'Space Grotesk', sans-serif;
}

@media (max-width: 480px) {
  .login-shell { padding: 12px; }
  .login-card { padding: 22px 18px; }
  .logo-frame { width: 50px; height: 50px; flex-basis: 50px; }
  .logo-frame img { width: 46px; height: 46px; }
  .brand h1 { font-size: 18px; }
  .lock { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
