@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ground: #f2f3ef;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --ink: #17202a;
  --ink-2: #3c4652;
  --muted: #5e6773;
  --line: #dfe2dc;
  --line-soft: #eceee9;
  --control: #d3d7cf;
  --accent: #2d4fb8;
  --accent-ink: #1e3a8f;
  --accent-soft: #edf1fb;
  --ok-bg: #e3f1e8;
  --ok-ink: #1b5e3b;
  --ok-dot: #1e7a4c;
  --err-bg: #fbe6e4;
  --err-ink: #8c1d16;
  --err-dot: #b3261e;
  --idle-bg: #eceee9;
  --idle-dot: #8a929b;
  --warn-bg: #fbf1dc;
  --warn-ink: #6b4a00;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-family:
    "IBM Plex Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ground);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ground);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
summary {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1,
h2,
p {
  margin: 0;
}
svg {
  flex-shrink: 0;
}

/* Layout */
.shell {
  display: flex;
  min-height: 100dvh;
}
.sidebar {
  width: 232px;
  flex-shrink: 0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100dvh;
}
.brand {
  padding: 0 10px 24px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.caption {
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
}
.nav-item:hover {
  background: #e8eae4;
}
.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 32, 42, 0.08);
}
.nav-item.active svg {
  color: var(--accent);
}
.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 12px 10px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 24px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-foot strong {
  font-size: 13px;
  font-weight: 600;
}
.sidebar-foot span {
  font-size: 12px;
  color: var(--muted);
}
.link-button {
  align-self: flex-start;
  margin-top: 6px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  text-decoration: underline;
}
.main {
  flex: 1;
  min-width: 0;
  max-width: 1600px;
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.page-header h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.page-header p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* Controls */
.select-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--surface);
  max-width: 100%;
}
.select-box span {
  font-size: 12px;
  color: var(--muted);
}
.select-box select {
  min-width: 0;
  max-width: 320px;
  border: 0;
  background: transparent;
  font-weight: 600;
  color: var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: var(--surface-2);
}
.btn.small {
  min-height: 36px;
  padding: 0 12px;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent-ink);
}
.btn.danger {
  color: var(--err-ink);
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
}
.icon-btn.small {
  width: 36px;
  height: 36px;
}
.icon-btn.ghost {
  border: 0;
  background: transparent;
}

/* Status */
.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--idle-bg);
  color: var(--ink-2);
  align-self: flex-start;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--idle-dot);
}
.pill.ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.pill.ok::before {
  background: var(--ok-dot);
}
.pill.error {
  background: var(--err-bg);
  color: var(--err-ink);
}
.pill.error::before {
  background: var(--err-dot);
}
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 13px;
}
.notice svg {
  margin-top: 1px;
}
.notice.info {
  background: var(--ground);
  color: var(--ink-2);
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.mono {
  font-family: var(--mono);
}

/* History */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.history-layout {
  display: flex;
  min-height: 560px;
  flex: 1;
}
.list-pane {
  flex: 0 1 400px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.list-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.event-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  text-align: left;
}
.event-row:hover {
  background: var(--surface-2);
}
.event-row.selected {
  background: var(--accent-soft);
}
.event-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.event-top strong {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.event-subject {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-preview {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pagination {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.detail-pane {
  flex: 1;
  min-width: 0;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-pane h2 {
  margin-top: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.meta {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 13px;
}
.meta dt {
  color: var(--muted);
}
.meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.message-body {
  margin: 0;
  max-width: 72ch;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mail-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.mail-images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 13px;
  color: var(--muted);
}
.mail-frame {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
}
.mobile-back {
  display: none;
}
.empty {
  padding: 64px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.empty svg {
  color: #b5bbb3;
  margin-bottom: 6px;
}
.empty h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.empty p {
  font-size: 13px;
  max-width: 360px;
}
.loading {
  padding: 24px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* TOTP */
.totp-card {
  width: 100%;
  max-width: 560px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.totp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.totp-head h2 {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ring circle {
  fill: none;
  stroke-width: 5;
}
.ring .track {
  stroke: var(--line-soft);
}
.ring .bar {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dasharray 0.25s linear;
}
.ring text {
  font-size: 15px;
  font-weight: 600;
  fill: var(--ink);
  font-family: inherit;
}
.otp-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  text-align: left;
}
.otp-code:hover:not(:disabled) {
  border-color: var(--control);
}
.otp-value {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.otp-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

/* Settings */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 18px 20px 14px;
}
.section-head h2 {
  font-size: 16px;
  font-weight: 600;
}
.section-head span {
  font-size: 12px;
  color: var(--muted);
}
.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
}
.row-main {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.row-main > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.row-main strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.row-detail {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.badge {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--ground);
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
}
.row-status {
  flex: 0 0 240px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
/* Fixed width keeps the status column aligned whatever buttons a row has. */
.row-actions {
  flex: 0 0 240px;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.chips {
  flex: 2 1 280px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ground);
  color: var(--ink-2);
  font-size: 12px;
}
.more {
  position: relative;
}
.more summary {
  list-style: none;
}
.more summary::-webkit-details-marker {
  display: none;
}
.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 180px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(23, 32, 42, 0.16);
}
.more-menu button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.more-menu button:hover {
  background: var(--surface-2);
}
.more-menu .danger {
  color: var(--err-ink);
}

/* Dialog & forms */
.dialog {
  width: 560px;
  max-width: calc(100vw - 24px);
  max-height: 90dvh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(23, 32, 42, 0.28);
  color: var(--ink);
}
.dialog::backdrop {
  background: rgba(23, 32, 42, 0.45);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.dialog-header h2 {
  font-size: 18px;
  font-weight: 600;
}
.dialog-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px -24px -20px;
  padding: 16px 24px;
  border-top: 1px solid var(--line-soft);
}
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.field input,
.field select,
textarea {
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}
textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  resize: vertical;
}
.field input[type="file"] {
  padding: 10px 12px;
}
.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
}
.choice-group legend {
  padding: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--control);
  border-radius: 10px;
  color: var(--ink-2);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}
.choice:has(input:disabled) {
  opacity: 0.6;
}
.choice input,
.check input {
  accent-color: var(--accent);
}
.check-group {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.check-group legend {
  padding: 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  font-size: 14px;
}
.token {
  min-height: 96px;
}

/* Employee picker */
.picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 2px 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
}
.picker-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.picker-remove svg {
  width: 14px;
  height: 14px;
}
.picker-remove:hover {
  background: rgba(45, 79, 184, 0.12);
}
.picker-results {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 400;
  color: var(--ink);
}
.picker-option:last-child {
  border-bottom: 0;
}
.picker-option:hover {
  background: var(--surface-2);
}
.picker-option input {
  accent-color: var(--accent);
}
.picker-option span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.picker-option strong {
  font-weight: 500;
}

/* Login */
.login {
  width: 420px;
  max-width: calc(100vw - 32px);
  margin: 12vh auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.login h1 {
  font-size: 24px;
  font-weight: 600;
}
.login .form {
  margin-top: 12px;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(23, 32, 42, 0.2);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 100;
}
#toast.visible {
  opacity: 1;
}
[hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .main {
    padding: 24px 20px;
  }
  .sidebar {
    width: 200px;
  }
  .list-pane {
    flex-basis: 320px;
    min-width: 260px;
  }
  .detail-pane {
    padding: 24px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
    padding-bottom: 76px;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    top: auto;
    z-index: 15;
    width: auto;
    height: auto;
    padding: 6px 4px 10px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    background: var(--surface);
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .brand,
  .caption,
  .nav-divider,
  .sidebar-foot {
    display: none;
  }
  .nav-item {
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 0 2px;
    font-size: 11px;
    text-align: center;
    color: var(--muted);
  }
  .nav-item.active {
    background: transparent;
    box-shadow: none;
    color: var(--accent);
  }
  .nav-item:hover {
    background: transparent;
  }
  .main {
    padding: 16px;
    gap: 16px;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .page-header p {
    display: none;
  }
  .header-actions,
  .select-box,
  .select-box select {
    width: 100%;
    max-width: none;
  }
  .select-box select {
    flex: 1;
  }
  .header-actions {
    flex-wrap: nowrap;
  }
  .header-actions .btn {
    flex: 1;
  }
  .history-layout {
    display: block;
    min-height: 0;
  }
  .list-pane {
    min-width: 0;
    border-right: 0;
  }
  .detail-pane {
    display: none;
  }
  .detail-pane.mobile-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 30;
    overflow: auto;
    background: var(--surface);
    padding: 8px 16px 24px;
  }
  .mobile-back {
    display: inline-flex;
    align-self: flex-start;
    border: 0;
    padding: 0 8px 0 0;
    color: var(--accent);
  }
  .otp-value {
    font-size: 34px;
  }
  .totp-card {
    padding: 20px;
  }
  .settings-row {
    padding: 14px 16px;
  }
  .section-head {
    padding: 16px 16px 12px;
  }
  .dialog-body {
    padding: 16px;
  }
  .dialog-actions {
    margin: 4px -16px -16px;
    padding: 12px 16px;
  }
  #toast {
    bottom: 88px;
  }
}
