:root {
  --app-bg: #f5f7fb;
  --app-surface: #fff;
  --app-surface-2: #f8fafc;
  --app-text: #172033;
  --app-muted: #68738a;
  --app-border: #e4e8f0;
  --app-primary: #5b5cf0;
  --app-primary-2: #7c5cff;
  --app-success: #16a36a;
  --app-danger: #df4458;
  --app-warning: #d98c18;
  --app-info: #2187d9;
  --app-shadow: 0 12px 34px rgba(34, 46, 84, 0.08);
  --sidebar-width: 272px;
  --topbar-height: 72px;
}
html[data-app-theme="dark"] {
  --app-bg: #0e1320;
  --app-surface: #171e2d;
  --app-surface-2: #111827;
  --app-text: #eef2ff;
  --app-muted: #9ba7bd;
  --app-border: #2a3448;
  --app-primary: #8587ff;
  --app-primary-2: #9d76ff;
  --app-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  background: var(--app-bg) !important;
  color: var(--app-text) !important;
}
body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  letter-spacing: -0.01em;
}
a {
  color: var(--app-primary);
  text-decoration: none;
}
.text-body {
  color: var(--app-text) !important;
}
.text-muted {
  color: var(--app-muted) !important;
}
.layout-wrapper {
  min-height: 100vh;
}
.layout-container {
  display: flex;
  min-height: 100vh;
}
.layout-menu {
  position: fixed !important;
  inset: 0 auto 0 0;
  width: var(--sidebar-width) !important;
  background: var(--app-surface) !important;
  border-right: 1px solid var(--app-border);
  box-shadow: none !important;
  z-index: 1100;
  transition: transform 0.25s ease;
}
.layout-page {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  background: var(--app-bg);
}
.app-brand {
  height: var(--topbar-height) !important;
  padding: 0 22px !important;
  border-bottom: 1px solid var(--app-border);
}
.app-brand-text {
  font-size: 1.05rem !important;
  color: var(--app-text) !important;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-2));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(91, 92, 240, 0.3);
}
.menu-inner {
  padding: 16px 12px !important;
  overflow-y: auto;
}
.menu-header {
  padding: 18px 12px 8px !important;
  color: var(--app-muted) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.12em;
}
.menu-item {
  margin: 3px 0 !important;
}
.menu-link {
  min-height: 44px;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  color: var(--app-muted) !important;
  font-weight: 600;
  gap: 11px;
}
.menu-link:hover {
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
}
.menu-item.active > .menu-link {
  background: linear-gradient(
    135deg,
    rgba(91, 92, 240, 0.15),
    rgba(124, 92, 255, 0.08)
  ) !important;
  color: var(--app-primary) !important;
}
.menu-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--app-surface-2);
  display: grid !important;
  place-items: center !important;
  font-size: 0.72rem;
}
.menu-item.active .menu-icon {
  background: var(--app-primary);
  color: #fff;
}
.layout-navbar {
  position: sticky !important;
  top: 0;
  z-index: 1050;
  min-height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.84) !important;
  border-bottom: 1px solid var(--app-border);
  backdrop-filter: blur(18px);
  padding: 0 28px !important;
  box-shadow: none !important;
}
html[data-app-theme="dark"] .layout-navbar {
  background: rgba(23, 30, 45, 0.86) !important;
}
.content-wrapper {
  padding: 28px !important;
  min-height: calc(100vh - var(--topbar-height));
}
.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-initial {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--app-primary), var(--app-primary-2));
  color: #fff;
  font-weight: 800;
  flex: 0 0 auto;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.page-heading h3,
.page-heading h4 {
  margin: 0;
  color: var(--app-text);
  font-weight: 750;
  letter-spacing: -0.035em;
}
.page-heading p {
  margin: 0.35rem 0 0;
  color: var(--app-muted);
}
.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--app-primary);
  margin-bottom: 5px;
}
.card,
.app-card {
  background: var(--app-surface) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 18px !important;
  box-shadow: var(--app-shadow) !important;
  color: var(--app-text) !important;
  overflow: hidden;
}
.card-header,
.card-footer {
  background: transparent !important;
  border-color: var(--app-border) !important;
  padding: 18px 20px;
}
.card-body {
  padding: 20px;
}
.card-header h5 {
  color: var(--app-text);
}
.table {
  color: var(--app-text) !important;
  margin: 0;
}
.table > :not(caption) > * > * {
  border-color: var(--app-border) !important;
  padding: 14px 18px;
  background: transparent !important;
}
.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--app-muted);
  font-weight: 800;
  background: var(--app-surface-2) !important;
  white-space: nowrap;
}
.table-hover tbody tr:hover > * {
  background: rgba(91, 92, 240, 0.045) !important;
}
.table-danger > * {
  background: rgba(223, 68, 88, 0.1) !important;
}
.form-control,
.form-select {
  background: var(--app-surface-2) !important;
  border: 1px solid var(--app-border) !important;
  color: var(--app-text) !important;
  border-radius: 11px !important;
  min-height: 43px;
  box-shadow: none !important;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--app-primary) !important;
  box-shadow: 0 0 0 3px rgba(91, 92, 240, 0.13) !important;
}
.form-control::placeholder {
  color: var(--app-muted);
}
.form-label {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--app-text);
}
.form-text {
  color: var(--app-muted) !important;
}
.form-check-input {
  background-color: var(--app-surface-2);
  border-color: var(--app-border);
}
.btn {
  border-radius: 11px !important;
  font-weight: 700;
  padding: 0.61rem 0.95rem;
  box-shadow: none !important;
}
.btn-sm {
  border-radius: 9px !important;
  padding: 0.38rem 0.66rem;
}
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--app-primary),
    var(--app-primary-2)
  ) !important;
  border: 0 !important;
}
.btn-success {
  background: var(--app-success) !important;
  border-color: var(--app-success) !important;
}
.btn-outline-primary {
  color: var(--app-primary) !important;
  border-color: rgba(91, 92, 240, 0.45) !important;
}
.btn-outline-secondary {
  color: var(--app-muted) !important;
  border-color: var(--app-border) !important;
}
.btn-outline-danger {
  color: var(--app-danger) !important;
  border-color: rgba(223, 68, 88, 0.45) !important;
}
.alert {
  border-radius: 14px !important;
  border: 1px solid transparent !important;
}
.alert-info {
  background: rgba(33, 135, 217, 0.12) !important;
  color: var(--app-text) !important;
  border-color: rgba(33, 135, 217, 0.23) !important;
}
.alert-warning {
  background: rgba(217, 140, 24, 0.12) !important;
  color: var(--app-text) !important;
  border-color: rgba(217, 140, 24, 0.25) !important;
}
.alert-danger {
  background: rgba(223, 68, 88, 0.12) !important;
  color: var(--app-text) !important;
  border-color: rgba(223, 68, 88, 0.25) !important;
}
.alert-success {
  background: rgba(22, 163, 106, 0.12) !important;
  color: var(--app-text) !important;
  border-color: rgba(22, 163, 106, 0.25) !important;
}
.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px !important;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.42rem 0.68rem;
  text-decoration: none;
}
.status-success,
.bg-label-success {
  background: rgba(22, 163, 106, 0.13) !important;
  color: #16a36a !important;
}
.status-danger,
.bg-label-danger {
  background: rgba(223, 68, 88, 0.13) !important;
  color: #df4458 !important;
}
.status-info,
.bg-label-info,
.bg-label-primary {
  background: rgba(91, 92, 240, 0.13) !important;
  color: var(--app-primary) !important;
}
.status-warning,
.bg-label-warning {
  background: rgba(217, 140, 24, 0.13) !important;
  color: #d98c18 !important;
}
.status-neutral,
.bg-label-secondary,
.bg-label-dark {
  background: var(--app-surface-2) !important;
  color: var(--app-muted) !important;
}
.nav-pills .nav-link,
.nav-tabs .nav-link {
  border-radius: 10px !important;
  color: var(--app-muted) !important;
  font-weight: 700;
}
.nav-pills .nav-link.active,
.nav-tabs .nav-link.active {
  background: var(--app-primary) !important;
  color: #fff !important;
}
.nav-tabs {
  border-color: var(--app-border) !important;
}
.modal-content,
.dropdown-menu {
  background: var(--app-surface) !important;
  color: var(--app-text) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--app-shadow) !important;
}
.modal-header,
.modal-footer {
  border-color: var(--app-border) !important;
}
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  color: var(--app-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}
.section-divider:before,
.section-divider:after {
  content: "";
  height: 1px;
  background: var(--app-border);
  flex: 1;
}
.empty-state {
  text-align: center !important;
  padding: 48px 20px !important;
  color: var(--app-muted) !important;
}
.pipeline-stage {
  background: var(--app-surface) !important;
}
.deal-card {
  background: var(--app-surface-2) !important;
  border-color: var(--app-border) !important;
  border-radius: 14px !important;
}
.bg-light,
.bg-white {
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
}
.border,
.border-top,
.border-bottom {
  border-color: var(--app-border) !important;
}
.pagination .page-link {
  background: var(--app-surface) !important;
  border-color: var(--app-border) !important;
  color: var(--app-text) !important;
}
.pagination .active .page-link {
  background: var(--app-primary) !important;
  color: #fff !important;
}
.theme-toggle,
.mobile-menu-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-surface-2);
  color: var(--app-text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.layout-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.5);
  z-index: 1090;
}
.mail-account-chip {
  padding: 7px 10px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-surface-2);
  font-size: 0.78rem;
  font-weight: 700;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  /* grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr); */
  background: var(--app-bg);
}
.auth-visual {
  padding: 8vw;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(133, 135, 255, 0.45),
      transparent 35%
    ),
    linear-gradient(145deg, #20236b, #5b5cf0 55%, #8f61ff);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px;
}
.auth-card {
  width: min(440px, 100%);
}
@media (max-width: 1199.98px) {
  .layout-menu {
    transform: translateX(-100%);
  }
  .layout-page {
    margin-left: 0;
    width: 100%;
  }
  body.sidebar-open .layout-menu {
    transform: translateX(0);
  }
  body.sidebar-open .layout-overlay {
    display: block;
  }
  .content-wrapper {
    padding: 22px !important;
  }
  .layout-navbar {
    padding: 0 18px !important;
  }
}
@media (max-width: 767.98px) {
  .content-wrapper {
    padding: 16px !important;
  }
  .layout-navbar {
    min-height: 64px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .card {
    border-radius: 15px !important;
  }
  .card-body {
    padding: 16px;
  }
  .table > :not(caption) > * > * {
    padding: 12px 13px;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-visual {
    display: none;
  }
  .auth-panel {
    padding: 18px;
  }
  .navbar-role {
    display: none;
  }
  .d-mobile-stack {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .d-mobile-stack > .btn,
  .d-mobile-stack > form,
  .d-mobile-stack > form .btn {
    width: 100%;
  }
  .pipeline-stage {
    width: 285px !important;
  }
}

/* CRM dashboard and production components */
.hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px;
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(255, 255, 255, 0.25),
      transparent 28%
    ),
    linear-gradient(135deg, #3f46be, #6258ef 56%, #845ce8);
  color: #fff;
  box-shadow: 0 20px 45px rgba(61, 68, 190, 0.24);
}
.hero-panel h2,
.hero-panel p,
.hero-panel .eyebrow {
  color: #fff;
}
.hero-panel .eyebrow {
  opacity: 0.72;
}
.hero-panel .btn-light {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #333bb0 !important;
  border: 0 !important;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.stat-card {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
  color: var(--app-text);
  transition:
    transform 0.18s ease,
    border-color 0.18s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 92, 240, 0.4);
  color: var(--app-text);
}
.stat-card span {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: 0.055em;
}
.stat-card strong {
  font-size: 1.75rem;
  line-height: 1;
  color: var(--app-text);
}
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--app-border);
}
.metric-row:last-child {
  border-bottom: 0;
}
.system-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
}
.system-dl dt {
  margin-top: 12px;
  color: var(--app-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.system-dl dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.pipeline-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.pipeline-stage {
  flex: 0 0 320px;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  padding: 14px;
  min-height: 260px;
}
.deal-card {
  border: 1px solid var(--app-border);
  padding: 14px;
  margin-top: 12px;
  box-shadow: 0 5px 14px rgba(34, 46, 84, 0.05);
}
.auth-card-panel {
  box-shadow: var(--app-shadow) !important;
}
.auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.auth-feature-list span {
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
}
textarea.form-control {
  min-height: 110px;
}
.table-responsive {
  scrollbar-width: thin;
}
.dropdown-item {
  color: var(--app-text) !important;
}
.dropdown-item:hover {
  background: var(--app-surface-2) !important;
}
html[data-app-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
@media (max-width: 1399.98px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 991.98px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-panel {
    padding: 24px;
  }
}
@media (max-width: 575.98px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .stat-card {
    min-height: 96px;
  }
  .hero-panel {
    padding: 20px;
    border-radius: 18px;
  }
  .hero-panel > div,
  .hero-panel .d-flex {
    width: 100%;
  }
  .hero-panel .btn {
    flex: 1;
  }
  .page-heading > .d-flex {
    width: 100%;
    flex-wrap: wrap;
  }
  .page-heading > .d-flex .btn {
    flex: 1;
  }
  .layout-navbar .btn-outline-secondary {
    padding: 0.38rem 0.55rem;
  }
  .layout-navbar strong {
    font-size: 0.88rem;
  }
}

/* Phase 2D-5 Team Workspace */
.office-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.65rem;
  min-width: 112px;
  text-align: center;
}
.navbar-avatar-wrap,
.profile-avatar-wrap {
  position: relative;
  display: inline-flex;
}
.navbar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(105, 108, 255, 0.2);
}
.presence-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
  background: #8592a3;
}
.presence-online {
  background: #71dd37;
}
.presence-away {
  background: #ffab00;
}
.presence-sleep {
  background: #03c3ec;
}
.presence-offline {
  background: #8592a3;
}
.profile-avatar {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(105, 108, 255, 0.12);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 700;
  background: rgba(105, 108, 255, 0.12);
  color: #696cff;
}
.profile-avatar-wrap .presence-dot {
  width: 22px;
  height: 22px;
  border-width: 4px;
  right: 8px;
  bottom: 8px;
}
.avatar-mini {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(105, 108, 255, 0.12);
  color: #696cff;
  font-weight: 700;
  overflow: hidden;
}
.avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.workspace-clock {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.chat-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 1rem;
  min-height: 650px;
}
.chat-sidebar,
.chat-main {
  overflow: hidden;
}
.chat-conversation-list {
  max-height: 580px;
  overflow: auto;
}
.chat-conversation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  text-decoration: none;
  color: inherit;
}
.chat-conversation:hover,
.chat-conversation.active {
  background: rgba(105, 108, 255, 0.08);
}
.min-w-0 {
  min-width: 0;
}
.chat-main {
  display: flex;
  flex-direction: column;
}
.chat-header {
  padding: 1rem 1.25rem;
}
.chat-messages {
  flex: 1;
  min-height: 480px;
  max-height: 620px;
  overflow: auto;
  padding: 1.25rem;
  background: rgba(133, 146, 163, 0.04);
}
.chat-message {
  display: flex;
  margin-bottom: 1rem;
}
.chat-message.mine {
  justify-content: flex-end;
}
.chat-bubble {
  max-width: min(78%, 720px);
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.chat-message.mine .chat-bubble {
  background: #696cff;
  color: #fff;
  border-color: #696cff;
}
.chat-body {
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-meta {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 0.45rem;
  text-align: right;
}
.chat-entity,
.chat-attachment {
  display: block;
  margin-top: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  text-decoration: none;
}
.chat-message.mine .chat-entity,
.chat-message.mine .chat-attachment {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.chat-compose {
  padding: 1rem;
  border-top: 1px solid var(--bs-border-color);
}
.chat-empty {
  height: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
@media (max-width: 991.98px) {
  .chat-shell {
    grid-template-columns: 1fr;
  }
  .chat-sidebar {
    max-height: 360px;
  }
  .chat-messages {
    min-height: 420px;
  }
  .chat-bubble {
    max-width: 90%;
  }
}

/* Phase 2D-5 messaging and notification polish */
.notification-dropdown {
  position: relative;
}
.notification-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--bs-border-color);
  border-radius: 50%;
  background: var(--bs-body-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: inherit;
}
.notification-button:hover {
  background: rgba(105, 108, 255, 0.08);
  border-color: rgba(105, 108, 255, 0.35);
}
.notification-bell {
  font-size: 1rem;
  line-height: 1;
}
.notification-count {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3e1d;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  border: 2px solid var(--bs-body-bg);
}
.notification-menu {
  width: min(390px, calc(100vw - 24px));
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16);
}
.notification-menu-head,
.notification-menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.notification-menu-foot {
  border-bottom: 0;
  border-top: 1px solid var(--bs-border-color);
  font-size: 0.82rem;
}
.notification-list {
  max-height: 430px;
  overflow: auto;
}
.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--bs-border-color);
}
.notification-item:hover {
  background: rgba(105, 108, 255, 0.06);
  color: inherit;
}
.notification-item:last-child {
  border-bottom: 0;
}
.notification-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(105, 108, 255, 0.12);
}
.notification-item-email .notification-icon {
  background: rgba(3, 195, 236, 0.12);
}
.notification-content {
  min-width: 0;
  flex: 1;
}
.notification-title {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notification-text {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notification-time {
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  margin-top: 0.2rem;
}
.notification-empty {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--bs-secondary-color);
}
.app-toast-container {
  position: fixed;
  right: 20px;
  top: 82px;
  z-index: 1095;
  width: min(370px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.app-notification-toast {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.8rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  padding: 0.9rem;
  display: flex;
  gap: 0.75rem;
  animation: appToastIn 0.2s ease-out;
}
.app-notification-toast a {
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}
.app-notification-toast .toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  font-size: 1.1rem;
  line-height: 1;
}
.app-notification-toast .toast-close:hover {
  opacity: 1;
}
@keyframes appToastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.chat-shell {
  min-height: calc(100vh - 185px);
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}
.chat-sidebar,
.chat-main {
  border-radius: 0.9rem;
}
.chat-conversation-list {
  max-height: calc(100vh - 310px);
}
.chat-main {
  min-height: 650px;
}
.chat-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  background: var(--bs-body-bg);
}
.chat-messages {
  min-height: 0;
  max-height: none;
  height: calc(100vh - 390px);
  padding: 1.4rem;
}
.chat-bubble {
  line-height: 1.45;
}
.chat-compose {
  background: var(--bs-body-bg);
  padding: 0.85rem 1rem;
}
.chat-compose-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}
.chat-compose-input {
  min-height: 44px;
  max-height: 150px;
  resize: none;
  border-radius: 0.75rem;
  padding: 0.68rem 0.85rem;
}
.chat-send-button {
  height: 44px;
  min-width: 82px;
  border-radius: 0.75rem;
}
.chat-compose-tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.55rem;
}
.chat-file-button {
  margin: 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--bs-primary);
  font-weight: 600;
}
.chat-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.chat-link-options {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--bs-border-color);
}
@media (max-width: 767.98px) {
  .app-toast-container {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
  }
  .notification-menu {
    width: calc(100vw - 24px);
  }
  .chat-main {
    min-height: 560px;
  }
  .chat-messages {
    height: 55vh;
    padding: 1rem;
  }
  .chat-compose-tools .text-muted {
    display: none;
  }
  .chat-send-button {
    min-width: 70px;
  }
  .chat-shell {
    min-height: auto;
  }
}
