/* Спільні стилі авторизації (топбар-віджет + модалка). */
#auth-slot { display: inline-flex; align-items: center; gap: 8px; }
.auth-user { font-size: 0.85rem; opacity: 0.9; }
.auth-btn {
  font-family: inherit; font-size: 0.85rem; padding: 6px 14px; border-radius: 16px;
  border: 1px solid rgba(140,140,140,0.4); background: transparent; color: inherit; cursor: pointer;
}
.auth-btn.primary { background: #8a5a3b; color: #fff; border-color: #8a5a3b; }
.auth-btn:hover { filter: brightness(1.08); }

#auth-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8,10,20,0.6); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#auth-modal.open { display: flex; }
.auth-box {
  position: relative; width: 360px; max-width: 94vw;
  background: #201d1a; color: #ece6dc;
  border: 1px solid rgba(160,150,255,0.2); border-radius: 16px;
  padding: 26px 24px 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  font-family: "Georgia", serif;
}
.auth-box h2 { margin: 0 0 16px; font-size: 1.3rem; text-align: center; }
.auth-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: #a89e90; font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.auth-close:hover { color: #fff; }
.auth-box label { display: block; margin-bottom: 12px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #a89e90; }
.auth-box input {
  display: block; width: 100%; margin-top: 5px; font-family: inherit; font-size: 0.95rem;
  padding: 9px 11px; border-radius: 8px; border: 1px solid rgba(160,150,255,0.25);
  background: #16130f; color: #ece6dc; text-transform: none; letter-spacing: normal;
}
.auth-box input:focus { outline: none; border-color: rgba(180,170,255,0.7); }
.auth-submit {
  width: 100%; margin-top: 6px; font-family: inherit; font-size: 0.95rem; padding: 11px;
  border-radius: 10px; border: none; background: #8a5a3b; color: #fff; cursor: pointer;
}
.auth-submit:hover { filter: brightness(1.1); }
.auth-switch { text-align: center; margin-top: 14px; font-size: 0.85rem; color: #a89e90; }
.auth-switch a { color: #d9a066; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.auth-err { color: #e08a6a; font-size: 0.85rem; margin-bottom: 10px; min-height: 1em; text-align: center; }

/* ---- Етап 2: кнопки додавання родича + селекти в модалці особи ---- */
.rid-addrel { display: flex; gap: 8px; flex-wrap: wrap; }
.rid-addrel-btn {
  padding: 9px 14px; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-family: inherit; border: 1px solid transparent;
  background: #8a6d3b; color: #fff; transition: filter .15s;
}
.rid-addrel-btn:hover { filter: brightness(1.08); }
.rid-addrel-btn.danger { background: transparent; color: #c0392b; border-color: #c0392b; }
.auth-box select {
  display: block; width: 100%; margin-top: 5px; box-sizing: border-box;
  padding: 9px 11px; border-radius: 8px; border: 1px solid rgba(160,150,255,0.25);
  font-size: 0.95rem; font-family: inherit; background: #16130f; color: #ece6dc;
  text-transform: none; letter-spacing: normal;
}
.auth-box select:focus { outline: none; border-color: rgba(180,170,255,0.7); }
