.top-actions { position: relative; }
.profile[aria-expanded="true"] { box-shadow: 0 0 0 3px #c9e3ff; }
.account-menu {
  position: fixed; z-index: 6; inset: var(--account-menu-top, 73px) 0 0 auto;
  display: flex; flex-direction: column; width: min(334px, calc(100% - 32px));
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 23px 0 0 0; background: #fff;
  box-shadow: 0 14px 44px #0f2c532b, 0 2px 6px #0f2c530b;
}
.account-menu-header { display: flex; align-items: center; gap: 11px; padding: 10px 10px 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.account-menu-header div { min-width: 0; overflow-wrap: anywhere; }
.account-menu-header small { margin-top: 2px; color: var(--muted); }
.account-menu button {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; padding: 5px 10px;
  flex-shrink: 0; border: 0; border-radius: 13px; color: var(--ink); background: transparent; text-align: left; font-size: .91rem; font-weight: 650;
}
.account-menu button:hover { background: #f1f7ff; }
.account-menu button span {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 11px; background: var(--accent-light); color: var(--accent-dark);
}
.account-alert-status { margin-left: auto; color: var(--muted); font-size: .68rem; }
.account-menu button[aria-pressed="true"] .account-alert-status { color: var(--accent-dark); }
.account-menu .account-logout { margin-top: auto; color: #a32537; }
.account-menu .account-logout span { background: #fff0f1; color: inherit; }
.account-avatar {
  display: grid; flex: 0 0 auto; place-items: center; overflow: hidden;
  width: 44px; height: 44px; background: var(--accent-light); color: var(--accent-dark);
  border-radius: 50%; font-size: .87rem; font-weight: 800;
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-page { width: 100%; max-width: 940px; margin-inline: auto; }
.account-hero { overflow: hidden; }
.account-cover {
  min-height: clamp(148px, 28vw, 244px); padding: clamp(12px, 2.5vw, 24px);
  background: linear-gradient(115deg, #0031a9b5, #007de72e), #0b3c85 url("assets/interior-ckupper.webp") center 51% / cover;
}
.account-back {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px;
  border-radius: 999px; border: 1px solid #ffffff5c; background: #0b214dd9; color: #fff; font-size: .8rem; font-weight: 700;
}
.account-back:hover { background: #062456; }
.account-identity { position: relative; padding: 62px clamp(17px, 3vw, 28px) 21px; }
.account-identity .account-avatar {
  width: 100px; height: 100px; position: absolute; top: -50px; left: clamp(17px, 3vw, 28px);
  border: 5px solid #fff; font-size: 1.9rem; box-shadow: 0 4px 12px #10284b1a;
}
.account-identity h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(1.65rem, 4vw, 2.75rem); }
.account-identity p { margin-top: 6px; color: var(--accent-dark); font-weight: 700; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.account-card { padding: clamp(16px, 3vw, 23px); }
.account-details { margin: 7px 0 0; }
.account-details div { padding: 11px 0; border-bottom: 1px solid var(--line); }
.account-details div:last-child { padding-bottom: 0; border: 0; }
.account-details dt { color: var(--muted); font-size: .81rem; margin-bottom: 4px; }
.account-details dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.account-security > p { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.account-pin {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px;
  padding: 5px 6px 5px 16px; border: 1px solid #d6e7ff; border-radius: 16px; background: #f2f7ff;
}
.account-pin output { color: #124c9c; font-size: 1.45rem; letter-spacing: .33em; font-weight: 800; font-variant-numeric: tabular-nums; }
.account-pin button { min-height: 44px; min-width: 44px; color: var(--accent-dark); border-radius: 50%; }
.account-help { display: grid; gap: 10px; margin-top: 15px; }
.account-help details { padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #f7faff; }
.account-help summary { cursor: pointer; font-weight: 700; font-size: .91rem; }
.account-help details p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.account-invite { display: grid; gap: 12px; }
.account-invite p { margin: 0; }
.account-invite .primary { width: 100%; }
.account-feedback { margin: 0; color: #4b6079; font-size: .85rem; }

body:has(.support-chat[open]) { overflow: hidden; }
dialog.support-chat {
  position: fixed; inset: var(--support-top, 0px) 0 auto; width: 100%; height: var(--support-height, 100dvh);
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0;
  overflow: hidden; background: #eef4fd;
}
.support-layout { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.support-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  color: #fff; background: linear-gradient(112deg, #092358, #164789);
  box-shadow: 0 2px 10px #061e4230; z-index: 1;
}
.support-header .icon-button { flex-shrink: 0; width: 44px; height: 44px; border-color: #ffffff48; color: #fff; background: #ffffff16; border-radius: 50%; }
.support-header .icon-button:hover { background: #ffffff32; }
.support-header img { flex-shrink: 0; border-radius: 50%; }
.support-header h2 { margin: 0; padding: 0; font-size: 1.12rem; letter-spacing: -.025em; }
.support-header p { margin: 1px 0 0; color: #e2ecff; font-size: .83rem; overflow-wrap: anywhere; }
.support-log {
  display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px max(clamp(12px, calc((100% - 830px) / 2), 100%), env(safe-area-inset-right)) 18px
    max(clamp(12px, calc((100% - 830px) / 2), 100%), env(safe-area-inset-left));
  background: radial-gradient(circle at 2px 2px, #7799ce22 1px, transparent 1.5px) 0 0 / 18px 18px, #eef4fd;
}
.support-empty { margin: auto !important; padding: 13px 16px; border: 1px solid #dde8fa; border-radius: 16px; background: #fff; color: var(--muted); text-align: center; font-size: .9rem; }
.support-message {
  align-self: flex-start; max-width: min(85%, 530px); padding: 9px 11px; border-radius: 15px 15px 15px 4px;
  background: #fff; overflow-wrap: anywhere; box-shadow: 0 1px 2px #10284b1f;
}
.support-message.own { align-self: flex-end; background: #dceaff; border-radius: 15px 15px 4px 15px; }
.support-message > span, .support-message time { display: block; color: #304e77; font-size: .72rem; font-weight: 650; }
.support-message time { margin-top: 3px; text-align: right; }
.support-message p { margin: 3px 0; white-space: pre-wrap; font-size: .94rem; }
.support-attachment { display: flex; align-items: center; gap: 9px; margin: 5px 0; padding: 8px; border-radius: 10px; background: #f3f7fe; color: #16417b; font-size: .86rem; font-weight: 700; }
.support-attachment:hover { background: #eff6ff; }
.support-attachment svg { flex-shrink: 0; }
.support-attachment:has(img) { display: block; padding: 0; overflow: hidden; }
.support-attachment img { display: block; width: min(280px, 62vw); height: min(220px, 33dvh); object-fit: contain; background: #e6eefb; }
.support-form {
  display: grid; gap: 8px; padding: 9px max(clamp(10px, calc((100% - 850px) / 2), 100%), env(safe-area-inset-right))
    calc(9px + env(safe-area-inset-bottom)) max(clamp(10px, calc((100% - 850px) / 2), 100%), env(safe-area-inset-left));
  border-top: 1px solid #dce7f7; background: #f8fbff;
}
.support-compose { position: relative; display: flex; align-items: flex-end; gap: 8px; }
.support-compose textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: min(110px, 20dvh); resize: none; field-sizing: content; padding: 11px 13px;
  border: 1px solid #d5e1f3; border-radius: 20px; color: var(--ink); background: #fff; font: inherit; font-size: 16px;
}
.support-compose .support-send, .support-picker summary {
  display: grid; place-items: center; width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%;
}
.support-picker summary { cursor: pointer; list-style: none; color: var(--accent-dark); background: #e6f1ff; }
.support-picker summary::-webkit-details-marker { display: none; }
.support-choices {
  position: absolute; z-index: 2; inset: auto auto calc(100% + 8px) 0;
  display: grid; gap: 4px; width: 195px; padding: 8px;
  border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 28px #102e5a27;
}
.support-choices button { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 8px; border: 0; border-radius: 9px; color: var(--accent-dark); background: #f1f7ff; text-align: left; font-weight: 700; }
.support-choices small { padding: 4px 6px; color: var(--muted); }
.support-picked { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 8px; border-radius: 12px; background: #e5efff; font-size: .85rem; }
.support-picked span { display: flex; color: var(--accent-dark); }
.support-picked strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.support-picked .icon-button { border: 0; border-radius: 50%; }
.support-form .support-feedback { margin: 0; }
@media (max-width: 630px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .account-invite input { font-size: 16px; }
}

.notification-bell { position: relative; width: 42px; height: 42px; border-radius: 50%; color: #174077; }
.notification-count {
  display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 19px; min-height: 19px; padding: 0 4px;
  border-radius: 999px; background: #075bc9; color: #fff; font-size: .66rem; font-weight: 800; line-height: 1;
}
.notification-bell .notification-count { position: absolute; top: -5px; right: -7px; border: 2px solid #fff; }
.account-menu button .notification-count {
  width: auto; height: auto; margin-left: auto; border-radius: 999px; background: #075bc9; color: #fff;
}
.nav-link .notification-count { margin-left: auto; display: inline-grid; }
.driver-search > .notification-bell {
  position: absolute; top: max(16px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right));
  background: #16386b; border-color: #ffffff45; color: #fff; z-index: 2;
}
.dialog-notifications { margin-top: 14px; }
.notification-list { display: grid; gap: 7px; list-style: none; padding: 0; margin: 0; }
.notification-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px;
  border: 1px solid #e1eafb; border-radius: 13px; background: #f6f9ff; color: var(--ink); text-align: left;
}
.notification-list button:hover { background: #eaf3ff; }
.notification-symbol {
  display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 11px;
  color: var(--accent-dark); background: var(--accent-light);
}
.notification-description { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.notification-description span, .notification-description small { color: var(--muted); font-size: .8rem; }
.notification-description small { font-size: .71rem; }
.notification-unread { width: 8px; height: 8px; margin-left: auto; flex: 0 0 auto; border-radius: 50%; background: #007aff; }
.notification-empty { display: grid; justify-items: center; padding: 20px 4px 4px; gap: 7px; text-align: center; color: var(--muted); }
.notification-empty svg { color: var(--accent); }
.notification-empty strong { color: var(--ink); }
.notification-trip { display: grid; gap: 9px; }
.notification-trip p { margin: 0; }
@media (max-width: 810px) {
  .nav-link { position: relative; }
  .nav-link .notification-count { position: absolute; top: 1px; left: calc(50% + 7px); }
  .admin-signed-in .nav-link .notification-count { position: static; }
}
