@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200;400;600;700;800&display=swap');

:root {
  --bg-app: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-input: #f9fafb;
  --bg-muted: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --border-subtle: #f3f4f6;
  --border-base: #e5e7eb;
  --accent: #fbbf24;
  --accent-soft: #fef3c7;
  --accent-faint: #fffbeb;
  --success: #10b981;
  --success-soft: #d1fae5;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --info: #3b82f6;
  --info-soft: #dbeafe;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Assistant', ui-sans-serif, system-ui, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  font-weight: 700;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1024px; margin: 0 auto; padding: 24px 20px 64px; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.topbar-inner { max-width: 1024px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(315deg, #f59e0b, #f97316, #f43f5e); color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(251,191,36,0.35);
}
.brand-title { font-size: 18px; font-weight: 800; line-height: 1; }
.brand-sub { font-size: 10px; letter-spacing: .15em; color: var(--text-faint); font-weight: 800; margin-top: 3px; }

/* Tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 24px 0; }
.tab {
  padding: 10px 18px; border-radius: 14px; border: none; background: transparent;
  color: var(--text-secondary); font-weight: 800; font-size: 14px; transition: all .2s;
}
.tab:hover { background: var(--bg-muted); }
.tab.active { background: var(--accent-soft); color: #92400e; }

/* Cards */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); padding: 24px; margin-bottom: 16px;
}
.card h2 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.card .sub { color: var(--text-muted); font-size: 14px; margin: 0 0 18px; font-weight: 700; }
.eyebrow { font-size: 10px; font-weight: 800; color: var(--text-faint); text-transform: uppercase; letter-spacing: .18em; margin-bottom: 6px; }

/* Forms */
label.field { display: block; margin-bottom: 16px; }
label.field .lbl { display: block; font-size: 13px; font-weight: 800; color: var(--text-secondary); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; padding: 14px 16px; background: var(--bg-input);
  border: 2px solid transparent; border-radius: 16px; outline: none;
  font-family: inherit; font-weight: 700; font-size: 15px; color: var(--text-primary); transition: all .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: #fff; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.hint { font-size: 12px; color: var(--text-faint); font-weight: 700; margin-top: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 22px; border-radius: 16px; border: none; font-weight: 800; font-size: 15px; transition: all .2s; }
.btn:active { transform: scale(.96); }
.btn-primary { background: #111827; color: #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.btn-primary:hover { background: #000; }
.btn-primary:disabled { opacity: .5; box-shadow: none; }
.btn-ghost { background: var(--bg-muted); color: var(--text-secondary); }
.btn-ghost:hover { background: var(--border-base); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.btn-block { width: 100%; }

/* Toggle */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 46px; height: 26px; border-radius: 999px; background: var(--border-base); position: relative; transition: all .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: all .2s; }
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { right: 23px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge-gray { background: var(--bg-muted); color: var(--text-secondary); }
.badge-green { background: var(--success-soft); color: #065f46; }
.badge-red { background: var(--danger-soft); color: #991b1b; }
.badge-amber { background: var(--accent-soft); color: #92400e; }
.badge-blue { background: var(--info-soft); color: #1e40af; }

/* Table / list */
.rec { border: 1px solid var(--border-subtle); border-radius: 18px; padding: 16px; margin-bottom: 10px; background: #fff; }
.rec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rec-title { font-weight: 800; font-size: 15px; }
.rec-meta { color: var(--text-muted); font-size: 13px; font-weight: 700; margin-top: 4px; }
.rec-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rec-links a { font-size: 13px; font-weight: 800; color: #92400e; background: var(--accent-faint); padding: 6px 12px; border-radius: 10px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--text-muted); font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.copywrap { display: flex; gap: 8px; align-items: stretch; }
.copywrap input { background: var(--bg-muted); }
.divider { height: 1px; background: var(--border-subtle); margin: 20px 0; border: none; }
.empty { text-align: center; color: var(--text-faint); font-weight: 700; padding: 40px 10px; }
.qr-box { text-align: center; padding: 16px; }
.qr-box img { width: 240px; height: 240px; border-radius: 16px; border: 1px solid var(--border-subtle); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg-muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 800; }
.chip button { background: none; border: none; color: var(--text-faint); font-weight: 900; font-size: 15px; line-height: 1; padding: 0; }
.chip button:hover { color: var(--danger); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.08); padding: 40px 32px; width: 100%; max-width: 400px; }
.login-badge { width: 64px; height: 64px; border-radius: 22px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; background: linear-gradient(315deg, #f59e0b, #f97316, #f43f5e); color: #fff; font-size: 30px; box-shadow: 0 10px 30px rgba(251,191,36,0.4); }
.auth-links { text-align: center; font-size: 14px; font-weight: 700; color: var(--text-muted); margin: 14px 0 0; }
.auth-links a { color: #92400e; font-weight: 800; }
.auth-links a:hover { text-decoration: underline; }

/* Pending-approval screen */
.pending-wrap { max-width: 560px; margin: 60px auto; text-align: center; }
.pending-icon { width: 72px; height: 72px; border-radius: 24px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; background: var(--accent-soft); color: #92400e; font-size: 34px; }

@media (max-width: 640px) {
  .rec-head { flex-direction: column; }
}
