/* Notification centre (bell) */
.topbar-right { gap: 0.5rem; }
.notify-btn {
  position: relative; align-self: stretch; width: 44px; min-width: 44px; height: auto; min-height: 0; margin: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; -webkit-tap-highlight-color: transparent;
}
/* the hover / open highlight and the "jobs running" ring are circles of the same size, centred on the bell */
.notify-btn::before, .notify-btn::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none; box-sizing: border-box;
}
.notify-btn:hover, .notify-btn:active, .notify-btn:focus, .notify-btn[aria-expanded="true"] { background: transparent; border: 0; box-shadow: none; transform: none; filter: none; }
.notify-btn::before { background: transparent; transition: background 120ms; }
.notify-btn:hover::before, .notify-btn[aria-expanded="true"]::before, .notify-btn:focus-visible::before { background: color-mix(in srgb, var(--accent, #b88916) 16%, transparent); }
.notify-btn svg { position: relative; z-index: 1; }
.notify-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notify-btn.has-unread { color: var(--accent-2, #d4aa32); }
.notify-badge {
  position: absolute; top: 50%; left: 50%; right: auto; margin: -21px 0 0 4px; z-index: 2; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #e0573c; color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px color-mix(in srgb, #000 72%, var(--bg, #0b0a08) 28%);
}
.notify-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: min(400px, calc(100vw - 1.4rem)); max-height: min(70vh, 560px); z-index: 210;
  display: flex; flex-direction: column; overflow: hidden;
  background: color-mix(in srgb, var(--surface, #12100b) 94%, #000 6%); border: 1px solid var(--line, #2a2517); border-radius: 14px;
  box-shadow: 0 16px 44px #000000a0; animation: accountMenuIn 140ms ease-out; transform-origin: top right;
}
.notify-panel[hidden] { display: none; }
.notify-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line, #2a2517); }
.notify-head strong { font-size: 0.95rem; }
.notify-head-actions { display: inline-flex; gap: 0.7rem; }
.notify-link { appearance: none; background: transparent; border: 0; padding: 0.15rem 0; width: auto; color: var(--accent-2, #d4aa32); font: inherit; font-size: 0.78rem; cursor: pointer; }
.notify-link:disabled { opacity: 0.4; cursor: default; }
.notify-list { list-style: none; margin: 0; padding: 0.25rem; overflow-y: auto; overscroll-behavior: contain; }
.notify-list[hidden] { display: none; }
.nf-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 26px; gap: 0.65rem; align-items: start;
  padding: 0.6rem 0.55rem; border-radius: 10px; cursor: pointer; position: relative;
}
.nf-row:hover, .nf-row:focus-visible { background: color-mix(in srgb, var(--accent, #b88916) 10%, transparent); outline: none; }
.nf-row.is-unread::before { content: ''; position: absolute; left: 2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent-2, #d4aa32); }
.nf-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent, #b88916) 16%, #0e0d09); color: var(--accent-2, #d4aa32); }
.nf-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nf-ico.is-err { background: #2a1210; color: #ff8a7e; }
.nf-clean { color: #5fcf8a; }
.nf-download, .nf-upload, .nf-share_open { color: #6fb7ff; }
.nf-main { display: grid; gap: 0.12rem; min-width: 0; }
.nf-main strong { font-size: 0.86rem; line-height: 1.25; }
.nf-row:not(.is-unread) .nf-main strong { font-weight: 600; color: var(--muted, #b2a47c); }
.nf-text { font-size: 0.8rem; color: var(--muted, #b2a47c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nf-row.is-error .nf-text { white-space: normal; color: #f2b3ab; }
.nf-main small { font-size: 0.72rem; color: var(--muted, #b2a47c); opacity: 0.8; }
.nf-x { appearance: none; background: transparent; border: 0; width: 26px; height: 26px; padding: 0; border-radius: 7px; color: var(--muted, #b2a47c); cursor: pointer; font-size: 0.8rem; opacity: 0; }
.nf-row:hover .nf-x, .nf-row:focus-within .nf-x { opacity: 1; }
.nf-x:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink, #f5f0df); }
@media (hover: none) { .nf-x { opacity: 0.7; } }
.notify-empty { display: grid; justify-items: center; gap: 0.35rem; text-align: center; padding: 1.6rem 1.2rem 1.8rem; color: var(--muted, #b2a47c); font-size: 0.82rem; }
.notify-empty[hidden] { display: none; }
.notify-empty svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.6; }
.notify-empty strong { color: var(--ink, #f5f0df); font-size: 0.92rem; }
@media (max-width: 640px) {
  .notify-btn { width: 40px; min-width: 40px; }
  .notify-panel { position: fixed; top: calc(var(--safe-top, 0px) + 74px); right: 0.5rem; left: 0.5rem; width: auto; max-height: 72vh; }
}

/* jobs in progress */
.nf-sec { list-style: none; padding: 0.55rem 0.55rem 0.2rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted, #b2a47c); font-weight: 650; display: flex; align-items: center; gap: 0.4rem; }
.nf-sec em { font-style: normal; background: color-mix(in srgb, var(--accent, #b88916) 25%, #0e0d09); color: var(--accent-2, #d4aa32); border-radius: 8px; padding: 0 0.4rem; font-size: 0.7rem; letter-spacing: 0; }
.nf-job { grid-template-columns: 34px minmax(0, 1fr) 22px; }
.nf-job .nf-main strong { color: var(--ink, #f5f0df); }
.nf-job.is-queued .nf-ico { opacity: 0.75; }
.nf-bar { display: block; height: 4px; border-radius: 3px; background: #1b170d; overflow: hidden; margin: 0.2rem 0 0.1rem; }
.nf-bar i { display: block; height: 100%; width: 0; background: var(--accent-2, #d4aa32); transition: width 0.5s ease; }
.nf-bar.is-indet i { width: 36%; animation: nf-slide 1.2s ease-in-out infinite; }
@keyframes nf-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@keyframes nf-rot { to { transform: rotate(360deg); } }
@keyframes nf-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.nf-state { display: grid; place-items: center; height: 100%; }
.nf-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3a3220; border-top-color: var(--accent-2, #d4aa32); animation: nf-rot 0.8s linear infinite; display: inline-block; }
.nf-clock { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted, #b2a47c); animation: nf-pulse 1.5s ease-in-out infinite; display: inline-block; }
/* the bell shows that something is running: a faint full circle with a bright arc turning around the bell */
.notify-btn.is-busy::after { border: 2px solid color-mix(in srgb, var(--accent-2, #d4aa32) 22%, transparent); border-top-color: var(--accent-2, #d4aa32); animation: nf-rot 1.1s linear infinite; }

/* stop button on a running / waiting transcode: sits over the spinner, appears on hover (always on touch screens) */
.nf-state { position: relative; }
.nf-job .nf-stop { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; opacity: 0; background: #2a1c18; color: #ffb4a8; }
.nf-job:hover .nf-stop, .nf-job:focus-within .nf-stop, .nf-stop:focus-visible { opacity: 1; }
.nf-job:hover .nf-state > i, .nf-job:focus-within .nf-state > i { opacity: 0; }
.nf-job .nf-stop:hover { background: #4a2a22; color: #fff; }
@media (hover: none) { .nf-job .nf-stop { opacity: 1; width: 22px; height: 22px; } .nf-job .nf-state > i { display: none; } }
