/* Hi-fi styles for the authenticated Account settings app (#accountApp).
   The login page keeps its own styles in styles.css — this file only touches the
   account app via ac-* classes and the shared shell. */

:root {
  --ac-ink: #16273F;
  --ac-body: #5B6675;
  --ac-muted: #8791A0;
  --ac-muted3: #98A2B0;
  --ac-card-border: #EAEDF3;
  --ac-btn-border: #E4E8EF;
  --ac-row-border: #F1F4F8;
  --ac-input-bg: #F6F8FC;
  --ac-input-border: #E4E9F1;
  --ac-red: #E8402A;
  --ac-red-hover: #D5361F;
  --ac-link: #2F6FE0;
  --ac-navy-save: #16456B;
}

[hidden] { display: none !important; }
.app-shell { background: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%); }
.app-shell .rm-header-inner,
.app-shell .rm-footer-inner { max-width: 90%; }

@keyframes acFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes acModalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ------------------------------- Hero ------------------------------- */
.ac-hero-inner { max-width: 90%; margin: 0 auto; padding: 32px 32px 8px; }
.ac-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ac-ink);
  margin: 0 0 6px;
}
.ac-subtitle { font-size: 15.5px; color: var(--ac-muted); margin: 0; }

/* ------------------------------- Layout ------------------------------- */
.ac-main {
  flex: 1;
  max-width: 90%;
  width: 100%;
  margin: 0 auto;
  padding: 24px 32px 56px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Side nav */
.ac-sidenav {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--ac-card-border);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(18, 38, 63, 0.05);
  padding: 12px;
}
.ac-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 11px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ac-body);
  padding: 11px 13px;
}
.ac-nav-icon { width: 30px; height: 30px; border-radius: 8px; background: #F2F4F8; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ac-nav-icon svg { stroke: var(--ac-muted); }
.ac-nav.active { font-weight: 700; color: var(--ac-ink); background: #FEF4F2; }
.ac-nav.active .ac-nav-icon { background: #FBE7E2; }
.ac-nav.active .ac-nav-icon svg { stroke: var(--ac-red); }
.ac-nav:focus-visible { outline: 2px solid var(--ac-link); outline-offset: 2px; }

.ac-section { animation: acFadeUp 0.3s ease both; }

/* ------------------------------- Cards & forms ------------------------------- */
.ac-card {
  background: #fff;
  border: 1px solid var(--ac-card-border);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(18, 38, 63, 0.05);
  padding: 28px;
}
.ac-card--narrow { max-width: 560px; }
.ac-card-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 20px; color: var(--ac-ink); margin: 0 0 4px; }
.ac-card-sub { font-size: 13.5px; color: var(--ac-muted); margin: 0 0 24px; }

.ac-label { display: block; font-family: "Poppins", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--ac-ink); margin-bottom: 8px; }
.ac-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-family: "Mulish", sans-serif;
  font-size: 15px;
  color: var(--ac-ink);
  background: var(--ac-input-bg);
  border: 1.6px solid var(--ac-input-border);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ac-input:focus { border-color: var(--ac-link); box-shadow: 0 0 0 4px rgba(47, 111, 224, 0.12); background: #fff; }

.ac-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ac-field-full { grid-column: 1 / -1; }
.ac-form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }

.ac-btn-ghost { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 14.5px; color: var(--ac-body); background: #fff; border: 1px solid var(--ac-btn-border); border-radius: 11px; padding: 11px 22px; }
.ac-btn-ghost:hover { border-color: #C7D0DE; }
.ac-btn-primary { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14.5px; color: #fff; background: var(--ac-red); border: none; border-radius: 11px; padding: 11px 24px; box-shadow: 0 6px 16px rgba(232, 64, 42, 0.28); }
.ac-btn-primary:hover { background: var(--ac-red-hover); }
.ac-btn-navy { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14.5px; color: #fff; background: var(--ac-navy-save); border: none; border-radius: 11px; padding: 12px 22px; box-shadow: 0 4px 12px rgba(22, 69, 107, 0.25); }
.ac-btn-navy:hover { background: #0F3552; }

/* ------------------------------- Avatar row ------------------------------- */
.ac-avatar-row { display: flex; align-items: center; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--ac-row-border); margin-bottom: 24px; }
.ac-avatar {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden;
  border: 3px solid #EEF1F6; box-shadow: 0 3px 10px rgba(18, 38, 63, 0.12); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 26px; color: #fff; background: #2F6FE0;
}
.ac-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ac-avatar.has-photo { color: transparent; background: #EEF1F6; }
.ac-avatar-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 16px; color: var(--ac-ink); }
.ac-avatar-hint { font-size: 13px; color: var(--ac-muted); margin: 3px 0 12px; }
.ac-avatar-hint.error { color: #C0392B; }
.ac-avatar-actions { display: flex; gap: 10px; }
.ac-avatar-upload { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--ac-ink); background: #fff; border: 1px solid var(--ac-btn-border); border-radius: 10px; padding: 9px 16px; }
.ac-avatar-upload:hover { border-color: #3C7CE0; color: #3C7CE0; }
.ac-avatar-remove { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 13.5px; color: #C0392B; background: #fff; border: 1px solid #F3D3D3; border-radius: 10px; padding: 9px 16px; }
.ac-avatar-remove:hover { background: #FCECEC; }

/* ------------------------------- Password ------------------------------- */
.ac-pw-fields { display: flex; flex-direction: column; gap: 18px; }
.ac-pw-reqs { background: var(--ac-input-bg); border: 1px solid var(--ac-card-border); border-radius: 12px; padding: 15px 17px; }
.ac-pw-reqs-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12.5px; color: var(--ac-ink); margin-bottom: 9px; }
.ac-pw-req { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ac-body); margin-bottom: 7px; }
.ac-pw-req:last-child { margin-bottom: 0; }

/* ------------------------------- Notifications ------------------------------- */
.ac-notif-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.ac-notif-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 20px; color: var(--ac-ink); margin: 0; }
.ac-notif-sub { font-size: 13.5px; color: var(--ac-muted); margin-top: 3px; max-width: 640px; }
.ac-notif-save-wrap { display: inline-flex; align-items: center; gap: 12px; }
.ac-saved-note { display: inline-flex; align-items: center; gap: 6px; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 13px; color: #1F8A5B; }
.ac-notif-groups { display: flex; flex-direction: column; gap: 28px; }
.ac-notif-group-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12.5px; letter-spacing: 0.7px; text-transform: uppercase; color: #3B5678; margin-bottom: 12px; }
.ac-notif-table { background: #fff; border: 1px solid var(--ac-card-border); border-radius: 14px; box-shadow: 0 4px 16px rgba(18, 38, 63, 0.04); overflow: hidden; }
.ac-notif-th { display: grid; grid-template-columns: 1fr 96px 96px; background: #F8FAFD; border-bottom: 1px solid var(--ac-card-border); padding: 12px 22px; }
.ac-notif-th span { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 11.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ac-muted); }
.ac-notif-th .ac-col { text-align: center; }
.ac-notif-row { display: grid; grid-template-columns: 1fr 96px 96px; align-items: center; padding: 15px 22px; border-top: 1px solid var(--ac-row-border); }
.ac-notif-name { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14.5px; color: var(--ac-ink); }
.ac-notif-desc { font-size: 12.5px; color: var(--ac-muted); margin-top: 2px; padding-right: 16px; }
.ac-notif-cell { display: flex; align-items: center; justify-content: center; }

/* Real checkbox styled as the 24px design box */
.ac-check {
  appearance: none;
  -webkit-appearance: none;
  width: 24px; height: 24px;
  margin: 0;
  border: 1.8px solid #C7D0DE;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: background .13s ease, border-color .13s ease;
}
.ac-check:checked {
  background: #2F6FE0;
  border-color: #2F6FE0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.ac-check:focus-visible { outline: 2px solid var(--ac-link); outline-offset: 2px; }

/* ------------------------------- Team ------------------------------- */
.ac-team-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.ac-team-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 20px; color: var(--ac-ink); margin: 0; }
.ac-team-sub { font-size: 13.5px; color: var(--ac-muted); margin-top: 3px; }
.ac-invite-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ac-red); border: none; color: #fff;
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 12px; box-shadow: 0 6px 16px rgba(232, 64, 42, 0.28);
}
.ac-invite-btn svg { stroke: #fff; }
.ac-invite-btn:hover { background: var(--ac-red-hover); }

.ac-team-card { background: #fff; border: 1px solid var(--ac-card-border); border-radius: 18px; box-shadow: 0 4px 16px rgba(18, 38, 63, 0.05); overflow: hidden; }
.ac-team-wrap { overflow-x: auto; }
.ac-team-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.ac-team-table thead tr { background: #F8FAFD; border-bottom: 1px solid var(--ac-card-border); }
.ac-team-table th { text-align: left; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12.5px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--ac-muted); padding: 14px 18px; }
.ac-team-table th:first-child { padding-left: 24px; }
.ac-team-table th.ac-th-actions { text-align: right; padding-right: 24px; }
.ac-team-table td { padding: 15px 18px; vertical-align: middle; }
.ac-team-table td:first-child { padding-left: 24px; }
.ac-team-table tbody tr { border-top: 1px solid var(--ac-row-border); }
.ac-team-table tbody tr:first-child { border-top: none; }
.ac-member { display: flex; align-items: center; gap: 12px; }
.ac-member-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14px; color: #fff; flex: 0 0 auto; }
.ac-member-name { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 14.5px; color: var(--ac-ink); }
.ac-member-you { font-size: 11.5px; color: var(--ac-muted); }
.ac-member-email { font-family: "Mulish", sans-serif; font-size: 14px; color: var(--ac-body); }
.ac-role { display: inline-block; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 12px; border-radius: 999px; padding: 4px 13px; border: 1px solid; }
.ac-role-owner { color: #C0392B; background: #FCECEC; border-color: #F3D3D3; }
.ac-role-admin { color: #6A45C9; background: #F1EEFC; border-color: #DDD1F5; }
.ac-role-editor { color: #2F6FE0; background: #EAF1FC; border-color: #D4E2F8; }
.ac-role-viewer { color: #5B6675; background: #EEF1F6; border-color: #DDE3EC; }
.ac-team-actions { display: flex; gap: 8px; justify-content: flex-end; }
.ac-td-actions { text-align: right; padding-right: 24px; }
.ac-edit-btn { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 13px; color: var(--ac-ink); background: #fff; border: 1px solid var(--ac-btn-border); border-radius: 9px; padding: 8px 15px; }
.ac-edit-btn:hover { border-color: #3C7CE0; color: #3C7CE0; }
.ac-remove-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: #fff; border: 1px solid var(--ac-btn-border); border-radius: 9px; color: var(--ac-muted3); }
.ac-remove-btn:hover { border-color: var(--ac-red); color: var(--ac-red); background: #FEF4F2; }
.ac-remove-btn:disabled { background: #F6F8FC; border-color: #EEF1F6; color: #C6CDD8; cursor: not-allowed; }
.ac-team-empty { padding: 40px 24px; text-align: center; color: var(--ac-muted); font-size: 14px; }

/* ------------------------------- Invite modal ------------------------------- */
.ac-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 80px 20px; overflow-y: auto; }
.ac-modal-backdrop { position: fixed; inset: 0; background: rgba(16, 26, 40, 0.5); }
.ac-modal-panel {
  position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 22px;
  box-shadow: 0 30px 80px -18px rgba(16, 26, 40, 0.5); overflow: hidden;
  animation: acModalIn 0.28s cubic-bezier(.22,.61,.36,1) both;
}
.ac-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border-bottom: 1px solid #EEF1F6; }
.ac-modal-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 21px; color: var(--ac-ink); margin: 0; }
.ac-modal-sub { font-size: 13.5px; color: var(--ac-muted); margin: 3px 0 0; }
.ac-modal-close { width: 40px; height: 40px; border-radius: 12px; background: #F4F6FA; border: 1px solid var(--ac-btn-border); color: var(--ac-body); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ac-modal-close:hover { background: #EBEFF5; }
.ac-modal-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.ac-role-pills { display: flex; gap: 9px; flex-wrap: wrap; }
.ac-role-pill { font-family: "Poppins", sans-serif; font-weight: 600; font-size: 13.5px; color: var(--ac-body); background: #fff; border: 1.6px solid var(--ac-input-border); border-radius: 999px; padding: 9px 20px; }
.ac-role-pill.active { color: #fff; background: var(--ac-ink); border-color: var(--ac-ink); }
.ac-role-desc { font-size: 12.5px; color: var(--ac-muted); margin: 10px 0 0; }
.ac-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 18px 28px; border-top: 1px solid #EEF1F6; background: #FBFCFE; }

/* ------------------------------- Responsive ------------------------------- */
@media (max-width: 900px) {
  .ac-main { grid-template-columns: 1fr; }
  .ac-sidenav { position: static; flex-direction: row; flex-wrap: wrap; }
  .ac-nav { width: auto; }
}
@media (max-width: 620px) {
  .ac-fields { grid-template-columns: 1fr; }
  .ac-hero-inner, .ac-main { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-section, .ac-modal-panel { animation: none; }
}
