/* Aria AI member portal polish */
.safety-card { display:none !important; }
.lifeline-layout { grid-template-columns:1fr !important; }

/* Match the member workspace shell to the staff portal. */
.app-shell { grid-template-columns:264px minmax(0,1fr); }
.sidebar {
  background:#11192b;
  padding:22px 16px;
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:none;
}
.brand { padding:2px 8px 24px; }
.brand-mark { border-radius:13px; }
.nav-list { gap:4px; }
.nav-item {
  position:relative;
  min-height:44px;
  padding:11px 13px;
  border-radius:12px;
  color:#aab6ca;
  font-size:13px;
  font-weight:650;
}
.nav-item:hover { background:rgba(255,255,255,.055); }
.nav-item.active {
  background:rgba(113,120,241,.14);
  box-shadow:none;
  color:#fff;
}
.nav-item.active::before {
  content:"";
  position:absolute;
  left:0;
  top:11px;
  bottom:11px;
  width:3px;
  border-radius:999px;
  background:#8a90ff;
}
.member-status-footer {
  display:block;
  margin-top:auto;
  padding:18px 8px 0;
  border-top:1px solid rgba(255,255,255,.08);
}
.member-status-footer .small { margin-top:10px; line-height:1.5; }
.main { padding:0 36px 54px; }
.topbar {
  position:sticky;
  top:44px;
  z-index:30;
  height:88px;
  margin:0 -36px 26px;
  padding:0 36px;
  background:rgba(247,248,252,.88);
  border-bottom:1px solid rgba(225,229,238,.9);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.topbar h1 { font-size:25px; letter-spacing:-.025em; }
.topbar .eyebrow { color:#8b95a6; }
.avatar {
  border:1px solid #dfe2fb;
  background:#f0f1ff;
  color:#555dcc;
  box-shadow:none;
}
.metric-card,.panel,.contact-card,.security-card,.med-card {
  border-radius:16px;
  box-shadow:0 8px 24px rgba(25,37,63,.045);
}
.hero-card { border-radius:20px; }
.section-heading { margin-top:0; }

.aria-chat-launcher {
  position:fixed;
  right:24px;
  bottom:24px;
  width:max-content;
  max-width:calc(100vw - 48px);
  min-width:0;
  min-height:54px;
  padding:9px 14px 9px 56px;
  border-radius:18px;
  border:0;
  color:#fff;
  background:linear-gradient(135deg,#6269e5,#835fdc);
  box-shadow:0 14px 34px rgba(68,70,160,.28);
  z-index:220;
  cursor:pointer;
  font-size:0;
  text-align:left;
  white-space:nowrap;
  overflow:visible;
  transition:transform .18s ease, box-shadow .18s ease;
}
.aria-chat-launcher::before {
  content:"A";
  position:absolute;
  left:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border-radius:11px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.18);
  color:#fff;
  font-size:17px;
  font-weight:800;
}
.aria-chat-launcher::after {
  content:"Aria AI";
  display:block;
  color:#fff;
  font-size:15px;
  line-height:1;
  font-weight:800;
  letter-spacing:0;
  white-space:nowrap;
}
.aria-chat-launcher:hover {
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(68,70,160,.32);
}
.aria-chat-launcher:focus-visible {
  outline:3px solid rgba(98,105,229,.34);
  outline-offset:4px;
}

.aria-bubble-panel {
  position:fixed; right:24px; bottom:92px; width:min(430px,calc(100vw - 28px)); height:600px;
  background:#fff; border:1px solid #e3e8f0; border-radius:22px; overflow:hidden;
  box-shadow:0 25px 70px rgba(17,31,56,.22); z-index:219;
  display:flex; flex-direction:column;
}
.aria-bubble-panel[hidden] { display:none; }
.aria-bubble-head { padding:17px 18px; display:grid; grid-template-columns:44px 1fr auto; gap:11px; align-items:center; border-bottom:1px solid #e8edf3; }
.aria-bubble-avatar { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background:linear-gradient(135deg,#6269e5,#835fdc); color:#fff; font-weight:800; }
.aria-bubble-title strong,.aria-bubble-title span { display:block; }
.aria-bubble-title strong { font-size:16px; }
.aria-bubble-title span { color:#7a8797; font-size:12px; margin-top:2px; }
.aria-chat-close { border:0; background:transparent; color:#738095; font-size:22px; padding:6px; cursor:pointer; }
.aria-bubble-log { flex:1; overflow:auto; padding:19px; background:#f8fafc; display:flex; flex-direction:column; gap:11px; }
.aria-bubble-msg { max-width:84%; padding:11px 13px; border-radius:14px; line-height:1.5; font-size:14px; }
.aria-bubble-msg.aria { align-self:flex-start; background:#fff; border:1px solid #e5eaf1; border-bottom-left-radius:5px; }
.aria-bubble-msg.user { align-self:flex-end; color:#fff; background:#6269e5; border-bottom-right-radius:5px; }
.aria-bubble-time { display:block; font-size:9px; margin-top:5px; opacity:.58; }
.aria-bubble-actions { display:flex; flex-direction:column; gap:7px; margin-top:3px; }
.aria-bubble-actions button { border-radius:11px; padding:10px 12px; font-weight:700; cursor:pointer; }
.aria-bubble-actions .contact { border:1px solid #dfe5ed; background:#fff; color:#48556b; }
.aria-bubble-actions .emergency { border:0; background:#c63f4f; color:#fff; }
.aria-bubble-input { display:grid; grid-template-columns:1fr auto; gap:8px; padding:13px; border-top:1px solid #e8edf3; background:#fff; }
.aria-bubble-input input { min-width:0; border:1px solid #dfe5ed; border-radius:11px; padding:11px 12px; outline:none; font-size:14px; }
.aria-bubble-input input:focus { border-color:#9ca2ee; box-shadow:0 0 0 3px rgba(93,101,232,.08); }
.aria-bubble-input button { border:0; border-radius:11px; padding:11px 14px; background:#6269e5; color:#fff; font-weight:700; cursor:pointer; }
.aria-bubble-note { padding:0 13px 12px; font-size:9px; color:#8995a5; background:#fff; }

@media(max-width:900px){
  .app-shell { display:block; }
  .sidebar {
    position:sticky;
    top:44px;
    z-index:50;
    height:auto;
    min-height:0;
    padding:10px 12px 8px;
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.08);
  }
  .brand { padding:3px 4px 10px; }
  .brand-mark { width:34px; height:34px; border-radius:10px; }
  .brand-subtitle { display:none; }
  .nav-list {
    flex-direction:row;
    gap:5px;
    overflow-x:auto;
    padding:0 1px 2px;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .nav-list::-webkit-scrollbar { display:none; }
  .nav-item {
    flex:0 0 auto;
    min-height:36px;
    padding:8px 11px;
    border-radius:10px;
    font-size:12px;
    white-space:nowrap;
  }
  .nav-item.active::before { display:none; }
  .member-status-footer { display:none; }
  .main { padding:0 16px 34px; }
  .topbar {
    position:relative;
    top:0;
    height:auto;
    min-height:82px;
    margin:0 -16px 20px;
    padding:15px 16px;
    background:rgba(247,248,252,.94);
  }
  .topbar h1 { font-size:21px; }
}

@media(max-width:700px){
  .aria-chat-launcher {
    right:16px;
    bottom:16px;
    width:max-content;
    max-width:calc(100vw - 32px);
    min-height:50px;
    padding:8px 12px 8px 51px;
    border-radius:16px;
  }
  .aria-chat-launcher::before { left:9px; width:32px; height:32px; border-radius:10px; font-size:16px; }
  .aria-chat-launcher::after { font-size:14px; line-height:1; }
  .aria-bubble-panel { right:14px; bottom:80px; height:min(590px,calc(100vh - 102px)); }
}
