/* Utility row and message drawer.
 *
 * Deliberately a separate file from sidebar.css rather than appended to it.
 * Static files are uploaded to S3 with `max-age=94608000` and served under a
 * stable name -- S3Boto3Storage does not hash filenames -- so editing a CSS file
 * that has already been deployed leaves CloudFront serving the cached copy.
 * That is exactly what happened when this was appended to sidebar.css: the
 * sidebar kept its styling and everything added here arrived unstyled.
 *
 * A new file has a name that was never cached, so it takes effect immediately.
 * The underlying trap remains for any future edit to either file -- see the PR
 * for the durable fix. */

/* ---------------------------------------------------------------------------
   Utility row (includes/_topbar.html)
   --------------------------------------------------------------------------- */

.app-topbar {
  min-height: 76px;
  background: #fff;
  border-bottom: 1px solid #e8ecf3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.app-topbar__field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.app-topbar__field--grow {
  flex: 1;
}

.app-topbar__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #8291a5;
  margin: 0;
}

.app-topbar__control {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7dde7;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.app-topbar__control--search {
  background: #f8fafc;
  font-weight: 400;
  color: #8291a5;
}

.app-topbar__control--search input {
  border: 0;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: 12.5px;
  color: #101828;
}

.app-topbar__marker {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #2563eb;
  flex: none;
}

.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.app-topbar__icon-button {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #d7dde7;
  background: #fff;
  color: #5b6b82;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-topbar__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 11px;
  font-weight: 700;
  background: #d0342c;
  color: #fff;
  border-radius: 999px;
  padding: 0 5px;
}

.app-topbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
}

.app-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #16253d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.app-topbar__username {
  font-size: 12.5px;
  font-weight: 600;
}

.app-topbar__caret {
  color: #8291a5;
  font-size: 12px;
}

/* ---------------------------------------------------------------------------
   Message drawer (includes/_message_drawer.html)
   --------------------------------------------------------------------------- */

.app-drawer {
  position: fixed;
  right: 24px;
  bottom: 0;
  width: 322px;
  max-width: calc(100vw - 48px);
  z-index: 1030;
}

.app-drawer__header {
  width: 100%;
  height: 44px;
  background: #d0342c;
  color: #fff;
  border: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -2px 6px rgba(16, 24, 40, 0.06), 0 -10px 24px rgba(208, 52, 44, 0.28);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  text-align: left;
}

.app-drawer__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  flex: none;
}

.app-drawer__title {
  font-size: 13.5px;
  font-weight: 700;
}

.app-drawer__count {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 1px 8px;
}

.app-drawer__caret {
  margin-left: auto;
  font-size: 12px;
}

.app-drawer__body {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-top: 0;
  max-height: 50vh;
  overflow-y: auto;
}

.app-drawer__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 13px;
  border-bottom: 1px solid #eef1f5;
  text-decoration: none;
  color: #101828;
  font-size: 12.5px;
}

.app-drawer__item:hover {
  background: #f8fafc;
}

.app-drawer__time {
  font-size: 12px;
  color: #8291a5;
}

.app-drawer__all {
  display: block;
  padding: 9px 13px;
  font-size: 12.5px;
  font-weight: 600;
}
