
/* ==========================================
   AON ID — SHARED INTERFACE DESIGN
   Website and Android presentation
========================================== */

:root {
  --aon-navy: #101827;
  --aon-navy-light: #182438;
  --aon-blue: #3478f6;
  --aon-blue-light: #eaf1ff;
  --aon-white: #ffffff;
  --aon-background: #f4f6fa;
  --aon-surface: #ffffff;
  --aon-text: #172033;
  --aon-muted: #778196;
  --aon-border: #e5e9f0;
  --aon-danger: #dc3545;
  --aon-success: #16865c;
  --aon-radius: 16px;
  --aon-shadow: 0 5px 22px rgba(16, 24, 39, 0.06);
}

/* ==========================================
   DASHBOARD SHELL
========================================== */

.aon-dashboard-shell {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--aon-background);
  color: var(--aon-text);
  box-sizing: border-box;
}

.aon-dashboard-shell *,
.aon-dashboard-shell *::before,
.aon-dashboard-shell *::after {
  box-sizing: border-box;
}

.aon-dashboard-screen-area {
  width: 100%;
  min-width: 0;
  flex: 1;
  padding: 24px;
}

.aon-dashboard-screen {
  width: 100%;
  min-width: 0;
  min-height: 100%;
}

.aon-dashboard-screen[hidden] {
  display: none !important;
}

.aon-android-navigation-area,
.aon-website-navigation-area {
  width: 100%;
  flex-shrink: 0;
}

.aon-android-shell {
  min-height: 100vh;
}

.aon-website-shell {
  min-height: 100%;
}

/* ==========================================
   GLOBAL FEATURE INTERFACES
========================================== */

.aon-profile-page,
.aon-connections-page,
.aon-messaging-page,
.aon-settings-page,
.aon-home-page {
  width: 100%;
  box-sizing: border-box;
  color: var(--aon-text);
  font-family: Arial, sans-serif;
}

.aon-profile-page *,
.aon-connections-page *,
.aon-messaging-page *,
.aon-settings-page *,
.aon-home-page * {
  box-sizing: border-box;
}

.aon-profile-page button,
.aon-connections-page button,
.aon-messaging-page button,
.aon-settings-page button,
.aon-home-page button,
.aon-profile-page input,
.aon-connections-page input,
.aon-messaging-page input,
.aon-settings-page input,
.aon-home-page input,
.aon-connections-page textarea,
.aon-messaging-page textarea {
  font: inherit;
}

.aon-profile-page button,
.aon-connections-page button,
.aon-messaging-page button,
.aon-settings-page button,
.aon-home-page button {
  cursor: pointer;
}

.aon-profile-page button:disabled,
.aon-connections-page button:disabled,
.aon-messaging-page button:disabled,
.aon-settings-page button:disabled,
.aon-home-page button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.aon-profile-page h2,
.aon-profile-page h3,
.aon-connections-page h2,
.aon-connections-page h3,
.aon-messaging-page h2,
.aon-settings-page h2,
.aon-settings-page h3,
.aon-home-page h2,
.aon-home-page h3 {
  margin-top: 0;
}

.aon-profile-page button:focus-visible,
.aon-connections-page button:focus-visible,
.aon-messaging-page button:focus-visible,
.aon-settings-page button:focus-visible,
.aon-home-page button:focus-visible,
.aon-dashboard-shell button:focus-visible {
  outline: 3px solid rgba(52, 120, 246, 0.35);
  outline-offset: 2px;
}

/* ==========================================
   FEATURE HEADERS
========================================== */

.aon-connections-header,
.aon-messaging-header,
.aon-settings-header {
  margin-bottom: 24px;
}

.aon-connections-header h2,
.aon-messaging-header h2,
.aon-settings-header h2 {
  font-size: 25px;
  margin-bottom: 7px;
  font-weight: 700;
}

.aon-connections-header p,
.aon-messaging-header p,
.aon-settings-header p {
  color: var(--aon-muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================
   PROFILE
========================================== */

.aon-profile-page {
  max-width: 760px;
  margin: 0 auto;
}

.aon-profile-header {
  background: linear-gradient(140deg, #101827, #1d3454);
  color: white;
  text-align: center;
  padding: 32px 20px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.aon-profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #3478f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  margin: 0 auto 14px;
  overflow: hidden;
}

.aon-profile-header h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.aon-profile-header p {
  font-size: 13px;
  opacity: 0.8;
  margin: 7px 0;
}

.aon-profile-verification {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border-radius: 30px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.aon-profile-id-card,
.aon-profile-details,
.aon-profile-management {
  background: var(--aon-surface);
  border: 1px solid var(--aon-border);
  border-radius: var(--aon-radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--aon-shadow);
}

.aon-profile-id-card {
  text-align: center;
}

.aon-profile-card-label {
  font-size: 11px;
  color: var(--aon-muted);
  letter-spacing: 1px;
  font-weight: 700;
}

.aon-profile-id-value {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 4px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}

.aon-profile-id-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.aon-profile-id-actions button {
  border: none;
  border-radius: 9px;
  padding: 10px 18px;
  background: var(--aon-blue-light);
  color: var(--aon-blue);
  font-weight: 700;
}

.aon-profile-details h3,
.aon-profile-management h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.aon-profile-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--aon-border);
  font-size: 13px;
}

.aon-profile-detail-row:last-child {
  border-bottom: none;
}

.aon-profile-detail-row span {
  color: var(--aon-muted);
}

.aon-profile-detail-row strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.aon-profile-management button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  background: transparent;
  padding: 16px 4px;
  border-bottom: 1px solid var(--aon-border);
  color: var(--aon-text);
  text-align: left;
}

.aon-profile-management button:last-child {
  border-bottom: none;
}

.aon-profile-management button span {
  font-size: 23px;
  color: var(--aon-muted);
}

.aon-profile-management .aon-profile-signout {
  color: var(--aon-danger);
  font-weight: 700;
}

/* ==========================================
   CONNECTIONS
========================================== */

.aon-connections-page {
  max-width: 850px;
  margin: 0 auto;
}

.aon-find-member-card,
.aon-connected-members {
  background: var(--aon-surface);
  border: 1px solid var(--aon-border);
  border-radius: var(--aon-radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--aon-shadow);
}

.aon-find-member-card h3,
.aon-connected-members h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.aon-find-member-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--aon-muted);
}

#aonFindMemberForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

#aonFindMemberForm label {
  font-size: 13px;
  font-weight: 700;
}

#aonFindMemberInput,
.aon-conversation-search input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--aon-border);
  border-radius: 10px;
  outline: none;
  background: white;
  color: var(--aon-text);
}

#aonFindMemberInput:focus,
.aon-conversation-search input:focus {
  border-color: var(--aon-blue);
}

#aonFindMemberButton,
.aon-settings-primary-button {
  background: var(--aon-blue);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 700;
}

.aon-connections-status,
.aon-settings-status {
  font-size: 13px;
  margin-top: 12px;
  color: var(--aon-success);
}

.aon-connections-status.error,
.aon-settings-status.error {
  color: var(--aon-danger);
}

.aon-member-result,
.aon-connected-member {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--aon-border);
}

.aon-member-avatar,
.aon-conversation-avatar {
  width: 45px;
  height: 45px;
  min-width: 45px;
  border-radius: 50%;
  background: var(--aon-blue-light);
  color: var(--aon-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.aon-member-information {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.aon-member-information strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.aon-member-information span {
  color: var(--aon-muted);
  font-size: 12px;
}

.aon-member-result button,
.aon-connected-member button {
  border: none;
  background: var(--aon-blue-light);
  color: var(--aon-blue);
  padding: 10px 13px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 12px;
}

.aon-connections-empty,
.aon-message-empty {
  padding: 28px 15px;
  text-align: center;
  color: var(--aon-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================
   MESSAGING
========================================== */

.aon-messaging-page {
  min-height: 500px;
}

.aon-messaging-layout {
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  gap: 18px;
  min-height: 500px;
}

.aon-conversation-panel,
.aon-active-chat-panel {
  background: var(--aon-surface);
  border: 1px solid var(--aon-border);
  border-radius: var(--aon-radius);
  box-shadow: var(--aon-shadow);
  overflow: hidden;
  min-width: 0;
}

.aon-conversation-search {
  padding: 14px;
  border-bottom: 1px solid var(--aon-border);
}

.aon-conversation-list {
  display: flex;
  flex-direction: column;
}

.aon-conversation-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--aon-border);
  text-align: left;
  color: var(--aon-text);
}

.aon-conversation-item.active {
  background: var(--aon-blue-light);
}

.aon-conversation-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aon-conversation-details strong {
  font-size: 13px;
}

.aon-conversation-details span {
  color: var(--aon-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aon-unread-count {
  min-width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--aon-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px;
}

.aon-chat-engine-mount {
  width: 100%;
  min-height: 500px;
  height: 100%;
}

/* ==========================================
   SETTINGS
========================================== */

.aon-settings-page {
  max-width: 760px;
  margin: 0 auto;
}

.aon-settings-group {
  background: var(--aon-surface);
  border: 1px solid var(--aon-border);
  border-radius: var(--aon-radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--aon-shadow);
}

.aon-settings-group h3 {
  font-size: 16px;
  margin-bottom: 16px;
}

.aon-setting-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid var(--aon-border);
}

.aon-setting-toggle span,
.aon-setting-row span {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aon-setting-toggle strong,
.aon-setting-row strong {
  font-size: 14px;
}

.aon-setting-toggle small,
.aon-setting-row small {
  color: var(--aon-muted);
  font-size: 12px;
  line-height: 1.5;
}

.aon-setting-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--aon-blue);
  flex-shrink: 0;
}

.aon-settings-primary-button {
  width: 100%;
  margin-top: 18px;
}

.aon-setting-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--aon-border);
}

.aon-setting-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--aon-border);
  padding: 17px 2px;
  text-align: left;
  color: var(--aon-text);
  font-weight: 600;
}

.aon-setting-action span {
  font-size: 22px;
  color: var(--aon-muted);
}

.aon-settings-signout {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #fff0f0;
  color: var(--aon-danger);
  padding: 14px;
  font-weight: 700;
}

/* ==========================================
   ANDROID INSTALLED-APP MODE
========================================== */

.aon-installed body {
  background: var(--aon-background);
}

.aon-installed .aon-android-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 0;
}

.aon-installed .aon-dashboard-screen-area {
  padding: 18px 15px calc(100px + env(safe-area-inset-bottom));
}

.aon-installed .aon-android-navigation-area {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
  background: white;
}

.aon-installed .aon-android-bottom-nav {
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: white;
  border-top: 1px solid var(--aon-border);
  padding: 8px 3px;
  box-shadow: 0 -4px 18px rgba(16, 24, 39, 0.06);
}

.aon-installed .aon-android-nav-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--aon-muted);
  padding: 7px 2px;
  min-width: 0;
  min-height: 48px;
}

.aon-installed .aon-android-nav-button.active {
  color: var(--aon-blue);
}

.aon-installed .aon-android-nav-icon {
  font-size: 21px;
  line-height: 1;
}

.aon-installed .aon-android-nav-label {
  font-size: 10px;
  font-weight: 600;
}

.aon-installed .aon-profile-page,
.aon-installed .aon-settings-page,
.aon-installed .aon-home-page {
  max-width: none;
}

.aon-installed .aon-messaging-layout {
  grid-template-columns: 1fr;
  gap: 12px;
}

.aon-installed .aon-conversation-panel {
  max-height: 340px;
  overflow-y: auto;
}

.aon-installed .aon-active-chat-panel {
  min-height: 380px;
}

/* ==========================================
   WEBSITE NAVIGATION
========================================== */

.aon-website-navigation-area {
  width: 100%;
}

.aon-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
  border-top: 1px solid var(--aon-border);
  background: white;
  padding: 10px;
}

.aon-nav-button {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--aon-muted);
  padding: 10px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  font-size: 13px;
}

.aon-nav-button.active {
  background: var(--aon-blue-light);
  color: var(--aon-blue);
  font-weight: 700;
}

/* ==========================================
   ANDROID HOME SCREEN
========================================== */

.aon-home-page {
  max-width: 850px;
  margin: 0 auto;
}

.aon-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.aon-home-greeting {
  color: var(--aon-muted);
  font-size: 13px;
}

.aon-home-header h2 {
  margin: 7px 0;
  font-size: 23px;
  overflow-wrap: anywhere;
}

.aon-home-member-status {
  color: var(--aon-success);
  font-size: 12px;
  font-weight: 700;
}

.aon-home-avatar {
  width: 58px;
  height: 58px;
  min-width: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--aon-blue);
  color: white;
  font-size: 24px;
  font-weight: 700;
}

.aon-home-welcome-card {
  padding: 25px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #101827, #244b79);
  color: white;
  margin-bottom: 25px;
}

.aon-home-card-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: 0.75;
  font-weight: 700;
}

.aon-home-welcome-card h3 {
  font-size: 22px;
  margin: 15px 0 9px;
}

.aon-home-welcome-card p {
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.85;
  margin: 0;
}

.aon-home-quick-actions h3,
.aon-home-activity h3 {
  font-size: 17px;
  margin-bottom: 15px;
}

.aon-home-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.aon-home-action-grid button {
  min-width: 0;
  min-height: 125px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  padding: 17px;
  border: 1px solid var(--aon-border);
  border-radius: 15px;
  background: white;
  color: var(--aon-text);
  text-align: left;
}

.aon-home-action-grid button:active {
  background: var(--aon-blue-light);
}

.aon-home-action-icon {
  color: var(--aon-blue);
  font-size: 23px;
}

.aon-home-action-grid strong {
  font-size: 14px;
}

.aon-home-action-grid small {
  color: var(--aon-muted);
  font-size: 11px;
}

.aon-home-activity {
  margin-top: 25px;
  padding: 20px;
  background: white;
  border: 1px solid var(--aon-border);
  border-radius: 15px;
}

.aon-home-activity p {
  color: var(--aon-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================
   RESPONSIVE LAYOUT
========================================== */

@media (max-width: 700px) {

  .aon-dashboard-screen-area {
    padding: 17px 13px;
  }

  .aon-messaging-layout {
    grid-template-columns: 1fr;
  }

  .aon-active-chat-panel {
    min-height: 400px;
  }

  .aon-profile-header {
    padding: 26px 15px;
  }

  .aon-profile-details,
  .aon-profile-management,
  .aon-profile-id-card,
  .aon-find-member-card,
  .aon-connected-members,
  .aon-settings-group {
    padding: 17px;
  }

  .aon-connections-header h2,
  .aon-messaging-header h2,
  .aon-settings-header h2 {
    font-size: 22px;
  }

  .aon-home-header h2 {
    font-size: 20px;
  }

}

@media (min-width: 701px) {

  .aon-installed .aon-messaging-layout {
    grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
  }

  .aon-website-shell .aon-dashboard-screen-area {
    padding: 24px;
  }

}

@media (max-width: 360px) {

  .aon-installed .aon-android-nav-label {
    font-size: 9px;
  }

  .aon-installed .aon-android-nav-icon {
    font-size: 19px;
  }

  .aon-home-action-grid {
    gap: 9px;
  }

  .aon-home-action-grid button {
    padding: 13px;
  }

}
