:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e6e8ee;
  --text: #1a1f2b;
  --text-soft: #4b5563;
  --muted: #6b7280;
  --primary: #1f6feb;
  --primary-dark: #1857c7;
  --success: #166534;
  --success-bg: #dcfce7;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Segoe UI", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  direction: rtl;
}

a { color: var(--primary); }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--primary);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}
.topbar .brand { font-weight: bold; font-size: 17px; }
.topbar .user-info { font-size: 13px; opacity: 0.95; }
.topbar .user-info button {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 8px;
}
.topbar .user-info button:hover { background: rgba(255,255,255,0.25); }

.centered {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow);
}
.card h1 { margin: 0 0 8px; font-size: 22px; }
.card .lead { margin: 0 0 20px; color: var(--text-soft); font-size: 14px; }

.row { margin-bottom: 14px; }
label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
input[type="email"], input[type="text"], input[type="password"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

textarea { min-height: 80px; resize: vertical; }

button.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
button.btn:hover { background: var(--primary-dark); }
button.btn:disabled { opacity: 0.6; cursor: not-allowed; }
button.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.status { margin-top: 12px; font-size: 14px; min-height: 22px; white-space: pre-line; }
.status.success { color: var(--success); }
.status.ok {
  color: #0d7a3e;
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
}

.status.error { color: var(--danger); }

.terms-row { margin-top: 4px; }
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1.5;
}
.terms-check input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  flex-shrink: 0;
}
.terms-check a { font-weight: 600; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-pane { display: none; padding: 24px; }
.tab-pane.active { display: block; }

.section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.section-card h2 { margin: 0 0 8px; font-size: 18px; }
.section-card .lead { margin: 0 0 16px; color: var(--text-soft); font-size: 14px; }

.placeholder-note {
  background: #fef9c3;
  border: 1px solid #fde68a;
  color: #78350f;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 10px;
}

.terms-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 14px;
  color: var(--text-soft);
}

/* modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 18px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.modal h2 { margin: 0 0 6px; font-size: 19px; }
.modal .lead { margin: 0 0 16px; color: var(--text-soft); font-size: 14px; }

.rating-group { display: flex; gap: 6px; }
.rating-group input { display: none; }
.rating-group label {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  margin: 0;
}
.rating-group input:checked + label {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 16px; }
