:root {
  --ink: #16131f;
  --ink-2: #4b4759;
  --muted: #8a8698;
  --line: #e7e4ee;
  --bg: #f7f6fa;
  --card: #ffffff;
  --accent: #6c47ff;
  --accent-2: #ece7ff;
  --danger: #d92d4b;
  --ok: #138a52;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22,19,31,.06), 0 4px 16px rgba(22,19,31,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Montserrat", "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5;
}
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; text-decoration: none; transition: background .15s, transform .1s, border-color .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5a35f0; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2e2a3b; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: #d4d0de; }
.btn-danger { background: transparent; color: var(--danger); border-color: #f2c7cf; }
.btn-danger:hover { background: #fff1f3; }
.btn-sm { padding: 7px 13px; font-size: 13.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
textarea.input { resize: vertical; min-height: 84px; }
.hint { font-size: 12.5px; color: var(--muted); }
.error { background: #fff1f3; color: var(--danger); border: 1px solid #f6cdd5; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 7vw, 96px); background: #fff; }
.auth-form h1 { font-size: 34px; letter-spacing: -.03em; margin: 34px 0 6px; line-height: 1.1; }
.auth-form .sub { color: var(--ink-2); margin: 0 0 26px; }
.auth-form form { max-width: 420px; }
.prefix-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; overflow: hidden; }
.prefix-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.prefix-input span { padding-left: 13px; color: var(--muted); white-space: nowrap; }
.prefix-input input { border: 0; padding: 11px 13px 11px 2px; outline: none; flex: 1; min-width: 0; background: transparent; }
.auth-art { background: linear-gradient(150deg, #6c47ff, #ff6a88 70%, #ffb36b); display: grid; place-items: center; padding: 40px; }
.auth-switch { margin-top: 20px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* little phone mockup used on landing + auth */
.mock-phone { width: 270px; border-radius: 40px; background: #111; padding: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.mock-screen { border-radius: 31px; padding: 36px 18px 28px; min-height: 500px; text-align: center; color: #fff; background: linear-gradient(160deg,#ff9a8b,#ff6a88 55%,#ff99ac); }
.mock-avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; background: #fff; color: #c2185b; display: grid; place-items: center; font-weight: 800; font-size: 26px; }
.mock-name { font-weight: 700; }
.mock-bio { font-size: 12px; opacity: .9; margin: 2px 0 18px; }
.mock-link { background: #fff; color: #c2185b; border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }

/* language switcher */
.lang-switch { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 10px; background: #fff; }
.lang-switch select { border: 0; background: transparent; padding: 7px 4px; font-size: 13.5px; font-weight: 600; cursor: pointer; outline: none; }
.notice { background: #eafaf1; color: var(--ok); border: 1px solid #c3ebd5; padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.forgot-link { font-size: 13px; font-weight: 600; text-decoration: none; }
.dev-box { background: #fff8e6; color: #7a5200; border: 1px solid #f6e2b0; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-top: 14px; overflow-wrap: anywhere; }

/* Arabic + right-to-left */
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", "Montserrat", system-ui, sans-serif; }
[dir="rtl"] .prefix-input { direction: ltr; }
[dir="rtl"] input[type=email], [dir="rtl"] input[type=url] { direction: ltr; text-align: right; }
[dir="rtl"] .logo { direction: ltr; }
/* clearer form errors on login / sign-up */
.error { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; border-width: 1.5px; animation: err-in .45s; }
.error::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #e11d48; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
@keyframes err-in { 0% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } 100% { transform: none; } }

/* Arabic (or any right-to-left text) typed into any box lines up correctly, whatever the site language */
input, textarea, select { unicode-bidi: plaintext; text-align: start; font-family: inherit; }
input[dir="ltr"] { unicode-bidi: normal; }
