/* RNSDevs Accounts — Design System */

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

:root {
  --bg:           #0b0c17;
  --surface:      rgba(255,255,255,.04);
  --surface-2:    rgba(255,255,255,.07);
  --border:       rgba(133,119,245,.18);
  --border-2:     rgba(133,119,245,.35);
  --purple:       #8577f5;
  --purple-dim:   rgba(133,119,245,.12);
  --purple-light: #a99cf8;
  --text:         #ffffff;
  --muted:        rgba(255,255,255,.42);
  --danger:       #f87171;
  --success-c:    #a7f3d0;
  --r:            16px;
  --r-sm:         10px;
  --r-xs:         7px;
}

html { font-size: 16px; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Auth background decorations ── */
.auth-pill {
  position: fixed;
  width: 560px;
  height: 220px;
  background: url('../style/rnsdevs-s5-indigo-xl.png') center / contain no-repeat;
  opacity: .13;
  top: -80px;
  left: -160px;
  transform: rotate(-18deg);
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}
.auth-pill.right {
  top: auto;
  left: auto;
  bottom: -80px;
  right: -160px;
  transform: rotate(162deg);
  opacity: .08;
}

/* ── Auth layout ── */
.auth-body { background: var(--bg); }
.auth-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 52px 16px 40px;
}
.auth-logo { height: 34px; margin-bottom: 40px; }
.auth-wrap > .card { width: 100%; max-width: 420px; }
.footer-note { margin-top: 24px; font-size: 12px; color: rgba(255,255,255,.2); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 28px;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: background .2s, border-color .2s, transform .15s;
  cursor: pointer;
}
.action-card:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
  transform: translateY(-2px);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  background: var(--purple);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, transform .15s;
  letter-spacing: .01em;
}
.btn-primary:hover  { background: #9d91f7; transform: translateY(-1px); }
.btn-primary:active { transform: none; }
.btn-primary.w-full { width: 100%; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s;
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-2); transform: translateY(-1px); }
.btn-secondary.w-full { width: 100%; }
.btn-secondary.danger:hover { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); color: var(--danger); }

/* ── Form ── */
.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  margin-bottom: 7px;
}
.input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.input::placeholder { color: rgba(255,255,255,.18); }
.input:focus { border-color: rgba(133,119,245,.5); background: rgba(133,119,245,.05); }
select.input { cursor: pointer; }
select.input option { background: #13142a; color: #fff; }

/* ── Social buttons ── */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, border-color .2s, transform .15s;
}
.social-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); transform: translateY(-1px); }

/* ── Alerts ── */
.alert-error {
  padding: 11px 16px;
  border-radius: var(--r-sm);
  background: rgba(248,113,113,.08);
  border: 1px solid rgba(248,113,113,.2);
  color: #fca5a5;
  font-size: 13px;
}
.alert-success {
  padding: 11px 16px;
  border-radius: var(--r-sm);
  background: rgba(110,231,183,.06);
  border: 1px solid rgba(110,231,183,.2);
  color: var(--success-c);
  font-size: 13px;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.2);
  font-size: 12px;
  margin: 4px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.07);
}

/* ── App header / topnav ── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,12,23,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(133,119,245,.12);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-logo { height: 24px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  margin-left: 16px;
}
.nav-link {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.48);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-link:hover  { color: #fff; background: rgba(255,255,255,.06); }
.nav-link.active { color: #fff; background: var(--purple-dim); }
.dev-link        { color: var(--purple-light) !important; }

/* ── Brand icon (fallback if no logo) ── */
.brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #5a51d0, var(--purple));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-icon.sm { width: 28px; height: 28px; border-radius: 7px; }

/* ── User menu + dropdown ── */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 10px;
  margin-left: auto;
  transition: background .2s;
}
.user-menu:hover { background: rgba(255,255,255,.05); }
.user-name { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.65); }
.avatar-sm {
  width: 30px; height: 30px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(133,119,245,.3);
}
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #13142a;
  border: 1px solid rgba(133,119,245,.2);
  border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(0,0,0,.65);
  overflow: hidden;
  z-index: 100;
}
.dropdown-header { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.dd-item {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.dd-item:hover        { background: rgba(255,255,255,.05); color: #fff; }
.dd-item.danger:hover { background: rgba(248,113,113,.08); color: var(--danger); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  background: #13142a;
  border: 1px solid rgba(133,119,245,.22);
  border-radius: var(--r);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #13142a;
}
.modal-body { padding: 16px 22px 22px; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}
.badge-purple { background: rgba(133,119,245,.12); color: var(--purple-light); border: 1px solid rgba(133,119,245,.28); }
.badge-muted  { background: rgba(255,255,255,.05); color: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.1); }
.badge-green  { background: rgba(110,231,183,.08); color: #6ee7b7; border: 1px solid rgba(110,231,183,.2); }

/* ── Utilities ── */
.muted        { color: var(--muted); }
.fw           { font-weight: 600; }
.w-full       { width: 100%; }
.text-center  { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, #fff 20%, var(--purple) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Dev portal sidebar ── */
.dev-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid rgba(133,119,245,.1);
  background: rgba(11,12,23,.95);
  display: flex;
  flex-direction: column;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .nav-links  { display: none; }
  .card       { padding: 22px 18px; }
  .auth-wrap  { padding: 36px 12px 32px; }
}
