:root {
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --text: #14181F;
  --muted: #4A525E;
  --line: #E3E6EA;
  --input: #C7CCD3;
  --navy: #101827;
  --accent: #35D4BF;
  --accent-dark: #0B7A6C;
  --on-accent: #06231F;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  line-height: 1.6;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.top { background: var(--navy); }
.top-row { display: flex; align-items: center; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; }
.brand-icon { width: 40px; height: 40px; border-radius: 10px; background: #202C3D; display: flex; align-items: center; justify-content: center; }

.main { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 40px; padding-bottom: 48px; }
.intro { flex: 1 1 300px; }
.intro h1 { margin: 0 0 12px; font-size: 2rem; line-height: 1.35; }
.intro p { margin: 0 0 20px; color: var(--muted); font-size: 1.05rem; }
.hint { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.hint strong { color: var(--text); }

.card { flex: 1 1 440px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }

.row { display: flex; flex-wrap: wrap; gap: 16px; }
.grow { flex: 1 1 200px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-size: 15px; font-weight: 500; padding: 0; margin-bottom: 6px; }
.field legend { margin-bottom: 8px; }

input[type="text"], input:not([type]), input[type="password"] {
  height: 48px; border: 1px solid var(--input); border-radius: 10px; padding: 0 14px;
  font: inherit; font-size: 16px; background: #fff; color: var(--text); width: 100%;
}
input[dir="ltr"] { text-align: left; }
input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent-dark); }

.seg { display: flex; gap: 6px; background: #EEF0F3; padding: 4px; border-radius: 12px; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.seg input:checked + span { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); }

.group { display: flex; flex-direction: column; gap: 18px; }
.group[hidden] { display: none; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }

button {
  height: 54px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent);
  font: inherit; font-size: 18px; font-weight: 700; cursor: pointer;
}
button:hover { filter: brightness(.95); }
button:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

.alert { border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.alert.ok { background: #E3F8F4; color: #0B5E54; border: 1px solid #A8E9DE; }
.alert.bad { background: #FDECEC; color: #8A1F1F; border: 1px solid #F4C2C2; }

.foot { border-top: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 14px; padding: 20px 0; }
