/* ==========================================================================
   NEXYNUS APP — RTL / PERSIAN STYLESHEET
   Shares the same color palette as the main site. Vazirmatn for Persian text;
   JetBrains Mono is kept only for the brand name / numeric readouts.
   ========================================================================== */
:root {
  --bg-dark: #080C14;
  --text-light: #F1F5F9;
  --text-muted: #94A3B8;
  --emerald: #00FFB3;
  --emerald-dark: #032219;
  --orange: #FF5E3A;
  --violet: #A855F7;
  --gold: #FFD000;
  --blue: #3AA0FF;
  --font-fa: 'Vazirmatn', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(ellipse 900px 500px at 85% -5%, rgba(0,255,179,0.07), transparent 60%),
    radial-gradient(ellipse 900px 500px at 10% 10%, rgba(168,85,247,0.08), transparent 60%);
  color: var(--text-light);
  font-family: var(--font-fa);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#bgGeometryCanvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

a { color: inherit; text-decoration: none; }

/* ---------------- Header ---------------- */
header {
  height: var(--header-h);
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky; top: 0; z-index: 100;
  gap: 1rem;
}
.brand-logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; font-family: var(--font-mono); white-space: nowrap; }
.brand-logo svg { width: 24px; height: 24px; }
.brand-tagline { font-size: .75rem; color: var(--text-muted); font-family: var(--font-fa); }

nav.app-nav { display: flex; gap: .4rem; align-items: center; }
nav.app-nav a {
  padding: .5rem 1rem; border-radius: 8px; font-size: .88rem; color: var(--text-muted);
  transition: all .2s; font-weight: 600;
}
nav.app-nav a:hover { color: var(--text-light); background: rgba(255,255,255,0.06); }
nav.app-nav a.btn-emerald { background: var(--emerald); color: var(--bg-dark); font-weight: 800; }
nav.app-nav a.btn-emerald:hover { filter: brightness(1.08); }

/* ---------------- Layout ---------------- */
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.2rem; }

.auth-card {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  backdrop-filter: blur(14px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}
.auth-card h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 800; margin-bottom: .4rem; }
.auth-card .subtitle { color: var(--text-muted); font-size: .92rem; margin-bottom: 1.8rem; line-height: 1.6; }

.field-group { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .45rem; }
.field-group label { font-size: .85rem; font-weight: 700; color: var(--text-light); }
.field-group input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
  padding: .85rem 1rem;
  border-radius: 12px;
  font-family: var(--font-fa);
  font-size: .95rem;
  transition: border-color .2s, background .2s;
}
.field-group input:focus { outline: none; border-color: var(--emerald); background: rgba(0,255,179,0.05); }
.field-group .field-error { color: var(--orange); font-size: .8rem; font-weight: 600; }

.btn-submit {
  width: 100%; padding: .95rem; border: none; border-radius: 12px;
  background: var(--emerald); color: var(--bg-dark); font-weight: 800; font-size: .95rem;
  font-family: var(--font-fa); cursor: pointer; transition: all .2s; margin-top: .5rem;
}
.btn-submit:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,255,179,0.3); }

.auth-alt-link { text-align: center; margin-top: 1.4rem; font-size: .88rem; color: var(--text-muted); }
.auth-alt-link a { color: var(--emerald); font-weight: 700; }

.alert-box {
  padding: .9rem 1.1rem; border-radius: 12px; font-size: .88rem; font-weight: 600;
  margin-bottom: 1.3rem; line-height: 1.6;
}
.alert-error { background: rgba(255,94,58,0.12); border: 1px solid rgba(255,94,58,0.35); color: #FFB199; }
.alert-success { background: rgba(0,255,179,0.12); border: 1px solid rgba(0,255,179,0.35); color: var(--emerald); }

/* ---------------- Dashboard ---------------- */
.dash-wrap { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 1.4rem; }
.dash-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 1.8rem;
}
.dash-card h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.dash-card p { color: var(--text-muted); font-size: .92rem; line-height: 1.7; }
.role-badge {
  display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: .75rem;
  font-family: var(--font-mono); font-weight: 800; margin-inline-start: .6rem;
  background: var(--gold); color: var(--bg-dark);
}

footer.app-footer {
  text-align: center; padding: 1.5rem; font-size: .78rem; color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.06); font-family: var(--font-mono);
}

@media (max-width: 500px) {
  .brand-tagline { display: none; }
  nav.app-nav a:not(.btn-emerald) { display: none; }
}
