* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --danger: #ef4444;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: var(--text);
  direction: rtl;
}

.login-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.login-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  margin-bottom: .3rem;
}

.login-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.field-label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
}

.field input {
  padding: .75rem .9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  text-align: right;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .2);
}

.login-btn {
  margin-top: .5rem;
  padding: .85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
}
.login-btn:hover { background: var(--accent-hover); }
.login-btn:active { transform: translateY(1px); }
.login-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.error-message {
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, .35);
  border-radius: 8px;
  padding: .6rem .8rem;
  font-size: .85rem;
  text-align: center;
}
