:root{
  --navy-900:#0f1c31;
  --navy-800:#15243d;
  --blue-500:#2f6ed3;
  --blue-600:#2563c7;
  --teal-500:#0d9488;
  --line:#cdd9eb;
  --bg:#edf2fa;
  --muted:#5a6f8f;
}

body.member-auth-bg{
  margin:0;
  min-height:100vh;
  font-family:Manrope,Arial,sans-serif;
  background:var(--bg);
  color:var(--navy-900);
}
.member-auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:20px;
}
.member-auth-card{
  width:min(460px,96vw);
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow:0 8px 24px rgba(15,28,49,.08);
  overflow:hidden;
}
.member-auth-card .card-body{background:#fff}
.member-auth-card h1{
  color:var(--navy-900);
  font-weight:800;
}
.member-auth-logo{
  width:40px;
  height:40px;
  object-fit:contain;
  border-radius:8px;
  background:#f4f8fd;
  padding:4px;
}
.member-auth-card .btn-primary{
  background:var(--blue-500);
  border:0;
  font-weight:700;
  padding:11px 16px;
  border-radius:10px;
}
.member-auth-card .btn-primary:hover{
  background:var(--blue-600);
}
.member-auth-card .form-control{
  border-color:var(--line);
  border-radius:10px;
  min-height:42px;
}
.member-auth-card .form-control:focus{
  border-color:var(--blue-500);
  box-shadow:0 0 0 .2rem rgba(47,110,211,.14);
}
.member-password-group .form-control{
  border-right:0;
}
.member-password-group .form-control:focus{
  border-right:0;
  z-index:3;
}
.member-password-toggle-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:0 14px;
  border:1px solid var(--line);
  border-left:0;
  border-radius:0 10px 10px 0;
  background:#f4f8fd;
  color:var(--blue-600);
  font-weight:700;
  font-size:.88rem;
  white-space:nowrap;
}
.member-password-toggle-btn:hover,
.member-password-toggle-btn:focus{
  background:#e8f1fc;
  color:var(--navy-900);
  border-color:var(--line);
  box-shadow:none;
}
.member-password-toggle-btn:focus-visible{
  outline:2px solid var(--blue-500);
  outline-offset:1px;
}
.member-password-toggle-btn i{
  font-size:1rem;
}
.member-capslock-hint{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:8px;
  padding:8px 10px;
  border-radius:8px;
  background:#fff8e8;
  border:1px solid #f0d9a8;
  color:#8a5a00;
  font-size:.84rem;
  font-weight:700;
}
.member-capslock-hint i{
  width:22px;
  height:22px;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#ffe8a3;
  font-size:.72rem;
}

body.member-app-bg{
  margin:0;
  background:var(--bg);
  font-family:Manrope,Arial,sans-serif;
  color:var(--navy-900);
  min-height:100vh;
}
.member-nav{
  background:var(--navy-900);
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 4px 16px rgba(11,21,38,.12);
}
.member-nav .navbar-brand,
.member-nav .navbar-brand span{
  color:#fff;
  font-weight:800;
}
.member-nav-logo{
  width:36px;
  height:36px;
  object-fit:contain;
  border-radius:8px;
  background:rgba(255,255,255,.08);
  padding:4px;
}
.member-nav .btn-light{
  border-radius:8px;
  font-weight:700;
  border:1px solid rgba(255,255,255,.15);
  background:#fff;
  color:var(--navy-900);
}
.member-nav-suivi-btn{
  font-weight:700;
  border-radius:8px;
  white-space:nowrap;
}
.member-nav-user{
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.member-nav-brand-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.member-menu-toggle{
  width:42px;
  height:42px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.1);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:1.15rem;
}
.member-menu-toggle:hover,
.member-menu-toggle:focus{
  background:rgba(255,255,255,.18);
  color:#fff;
}
.member-mobile-offcanvas{
  width:100% !important;
  max-width:100%;
  background:#0f1c31;
  color:#fff;
}
.member-mobile-offcanvas .offcanvas-header{
  background:#15243d;
  color:#fff;
}
.member-mobile-offcanvas .btn-close{
  filter:invert(1);
  opacity:.85;
}
.member-mobile-offcanvas .offcanvas-title{
  color:#fff;
  font-weight:800;
}
.member-mobile-nav{
  display:flex;
  flex-direction:column;
  min-height:calc(100vh - 72px);
}
.member-mobile-nav-link,
.member-mobile-nav-btn{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  padding:18px 20px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:transparent;
  color:#fff;
  text-decoration:none;
  font-size:1.05rem;
  font-weight:700;
  text-align:left;
}
.member-mobile-nav-link i,
.member-mobile-nav-btn i{
  width:22px;
  text-align:center;
  font-size:1.1rem;
  opacity:.95;
}
.member-mobile-nav-link:hover,
.member-mobile-nav-btn:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}
.member-mobile-nav-link-accent{
  color:#6ee7d6;
}
.member-mobile-nav-link-danger{
  margin-top:auto;
  color:#fecaca;
  border-top:1px solid rgba(255,255,255,.12);
}
.member-contract-nav-btn{
  font-weight:700;
  white-space:nowrap;
}
.member-contract-modal .modal-content{
  border:none;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 20px 50px rgba(15,28,49,.2);
}
.member-contract-modal .modal-header,
.member-contract-modal .modal-footer{
  background:#f6f9fd;
  border-color:#dbe4f0;
}
.member-contract-pdf-frame{
  width:100%;
  min-height:72vh;
  border:0;
  background:#fff;
  display:block;
}
@media (max-width:767.98px){
  .member-contract-nav-btn span.member-contract-nav-label{display:none}
  .member-contract-pdf-frame{min-height:58vh}
}
.member-panel{
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 4px 14px rgba(15,28,49,.06);
  background:#fff;
}
.member-panel .card-header{
  background:#f6f9fd;
  border-bottom:1px solid var(--line);
  font-weight:700;
  color:var(--navy-900);
}
.member-panel .card-footer{
  background:#fafcff;
  border-top:1px solid var(--line);
}
.member-dot{
  width:9px;
  height:9px;
  background:#dc3545;
  border-radius:50%;
  display:inline-block;
}
.member-thread{
  max-height:64vh;
  overflow:auto;
  background:#fff;
  padding:14px;
}
.member-msg{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:12px;
}
.member-msg header strong{color:var(--navy-900)}
.member-msg-other{
  background:#f6f9fd;
  border-left:3px solid var(--blue-500);
}
.member-msg-me{
  background:#f0faf8;
  border-left:3px solid var(--teal-500);
}
.member-msg-body p:last-child{margin-bottom:0}
.member-panel .btn-primary{
  background:var(--blue-500);
  border:0;
  font-weight:700;
  border-radius:10px;
}
.member-panel .btn-primary:hover{background:var(--blue-600)}
.member-panel .form-control{
  border-color:var(--line);
  border-radius:10px;
}
.member-panel .form-control:focus{
  border-color:var(--blue-500);
  box-shadow:0 0 0 .2rem rgba(47,110,211,.14);
}
@media (max-width:991.98px){
  .member-thread{max-height:none}
  .member-nav-brand-text{max-width:42vw}
  .member-thread-panel .card-header{
    position:sticky;
    top:0;
    z-index:2;
  }
  .member-panel .card-footer{
    position:sticky;
    bottom:0;
    z-index:2;
    box-shadow:0 -4px 16px rgba(15,28,49,.06);
  }
}
@media (max-width:575.98px){
  .member-nav-logo{width:32px;height:32px}
  .member-msg{padding:10px 12px}
  .member-thread{padding:10px}
}
