/* PacaBot Marketer Portal — shared styles.
   Palette + type mirror /login/ and /dashboard/ so the entire product
   feels like one system. Arabic MSA, RTL, Alexandria type.
*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base:       #070B24;
  --bg-card:       #0D1235;
  --bg-input:      #111842;
  --gold:          #F5A623;
  --gold-dim:      rgba(245,166,35,0.15);
  --gold-glow:     rgba(245,166,35,0.35);
  --gold-border:   rgba(245,166,35,0.35);
  --cyan:          #00D4FF;
  --cyan-dim:      rgba(0,212,255,0.12);
  --cyan-glow:     rgba(0,212,255,0.3);
  --white:         #FFFFFF;
  --text-primary:  #F4F7FF;
  --text-secondary:#8A90B8;
  --text-dim:      #525780;
  --border-dim:    rgba(255,255,255,0.08);
  --border-focus:  rgba(245,166,35,0.5);
  --radius-card:   20px;
  --radius-pill:   100px;
  --radius-input:  12px;
  --trans:         all 0.3s ease;
  --red:           #FF5C5C;
  --red-dim:       rgba(255,92,92,0.12);
  --green:         #4ADE80;
  --green-dim:     rgba(74,222,128,0.14);
}

html { direction: rtl; text-align: right; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Alexandria', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 16px 40px;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
}
.orb-gold {
  width: 500px; height: 500px;
  background: var(--gold);
  opacity: 0.055;
  top: -80px; right: -100px;
}
.orb-cyan {
  width: 400px; height: 400px;
  background: var(--cyan);
  opacity: 0.05;
  bottom: -60px; left: -80px;
}

.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7,11,36,0.7);
  backdrop-filter: blur(10px);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--gold);
  color: #07080F;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { font-weight: 500; font-size: 0.95rem; }
.logo-by { font-size: 0.72rem; color: var(--text-dim); }

.top-bar-action {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.top-bar-action a {
  color: var(--gold);
  text-decoration: none;
  transition: var(--trans);
}
.top-bar-action a:hover { color: #FFD166; }

/* ── AUTH CARD ── */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 24px;
  animation: fadeUp 0.6s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  backdrop-filter: blur(20px);
}
.card-header {
  text-align: center;
  margin-bottom: 30px;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  background: var(--cyan-dim);
  margin-bottom: 20px;
}
.card-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--cyan);
}
.card-title {
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 8px;
}
.card-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── FORM ── */
.form-group { margin-bottom: 18px; }
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-input);
  padding: 13px 16px;
  font-family: 'Alexandria', system-ui, sans-serif;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--trans);
  outline: none;
}
input[dir="ltr"] { direction: ltr; text-align: left; }
input:focus {
  border-color: var(--border-focus);
  background: rgba(17,24,66,0.9);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
input.error-field {
  border-color: rgba(255,92,92,0.5);
  box-shadow: 0 0 0 3px var(--red-dim);
}
.hint-line {
  display: block;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 6px;
}

/* ── MESSAGES ── */
.form-message {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 18px;
  text-align: center;
}
.form-message.error {
  display: block;
  background: var(--red-dim);
  border: 1px solid rgba(255,92,92,0.2);
  color: #FF8A8A;
}
.form-message.success {
  display: block;
  background: rgba(0,212,255,0.08);
  border: 1px solid var(--cyan-dim);
  color: var(--cyan);
}

/* ── BUTTONS ── */
.btn-login {
  width: 100%;
  background: var(--gold);
  color: #07080F;
  font-family: 'Alexandria', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: var(--trans);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}
.btn-login:hover:not(:disabled) {
  background: #FFD166;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--gold-glow);
}
.btn-login:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}
.btn-login .btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(7,8,15,0.3);
  border-top-color: #07080F;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-login.loading .btn-text { display: none; }
.btn-login.loading .btn-spinner { display: block; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-family: 'Alexandria', system-ui, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans);
}
.btn-ghost:hover {
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ── DASHBOARD ── */
.dash-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.dash-title {
  font-size: 1.5rem;
  font-weight: 500;
}
.dash-title .greeting-name { color: var(--gold); }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-card);
  padding: 28px;
}
.panel h2 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.panel p { color: var(--text-secondary); font-size: 0.9rem; }

/* Referral code card */
.code-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-input);
  padding: 14px 18px;
  margin-top: 10px;
}
.code-value {
  font-family: 'Alexandria', monospace;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.18em;
  direction: ltr;
  flex: 1;
}
.copy-btn {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-family: 'Alexandria', sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans);
}
.copy-btn:hover { background: rgba(0,212,255,0.2); }
.copy-btn.copied {
  background: var(--green-dim);
  color: var(--green);
  border-color: var(--green-dim);
}

.link-line {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 10px;
  direction: ltr;
  text-align: left;
  word-break: break-all;
}

/* Earnings table */
.earnings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.earnings-table th, .earnings-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid var(--border-dim);
  font-size: 0.9rem;
}
.earnings-table th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.earnings-table tbody tr:last-child td { border-bottom: none; }
.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 500;
}
.status-pill.pending { background: var(--gold-dim); color: var(--gold); }
.status-pill.paid    { background: var(--green-dim); color: var(--green); }

.empty-state {
  color: var(--text-dim);
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}
