:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  color: #17263a;
  background: #f6f8fb;
  --ink: #17263a;
  --muted: #6f7e91;
  --line: #dfe5ed;
  --surface: #ffffff;
  --surface-soft: #fbfcfe;
  --accent: #ff7a1a;
  --accent-hover: #e9650d;
  --accent-soft: #fff1e8;
  --accent-border: #ffc89e;
  --success: #1f9d64;
  --danger: #e5484d;
  --warning: #d58a18;
  --shadow: 0 16px 38px rgba(31, 45, 61, 0.1), 0 3px 10px rgba(31, 45, 61, 0.04);
  --ease: 180ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  color: var(--ink);
  background: #f6f8fb;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(255, 122, 26, 0.32);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.mailcom-shell {
  width: min(1680px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto 24px;
  padding-top: 24px;
}

.product-nav-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 56px;
  height: 56px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  border: 1px solid rgba(226, 231, 238, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(31, 45, 61, 0.075), 0 1px 2px rgba(31, 45, 61, 0.035);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.product-nav-logo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #121826;
  background: #f4f6f8;
  text-decoration: none;
  transition: background-color var(--ease);
}

.product-nav-logo img {
  width: 21px;
  height: 21px;
  display: block;
  object-fit: contain;
}

.product-nav-logo:hover {
  background: #eceff3;
}

.product-nav-title {
  min-width: 0;
  margin-left: 10px;
  padding-left: 14px;
  flex: 0 1 auto;
  overflow: hidden;
  border-left: 1px solid #edf0f3;
  color: #17202c;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-nav-actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.product-nav-link {
  min-height: 34px;
  padding: 0 13px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  color: #2b3441;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}

.product-nav-link:hover {
  color: #171d27;
  background: #f5f6f8;
}

.product-nav-link.is-active,
.product-nav-link.is-active:hover {
  color: #df762c;
  background: var(--accent-soft);
}

.password-workspace {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.entry-panel,
.progress-panel,
.results-panel {
  box-shadow: var(--shadow);
}

.entry-panel {
  padding: 24px;
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.entry-panel > form {
  padding: 28px;
  border: 1px solid #e3e8ef;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 7px 22px rgba(31, 45, 61, 0.055);
}

.entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
  grid-template-areas:
    "accounts log"
    "hint policy-heading"
    "modes policies"
    "controls controls";
  align-items: stretch;
  column-gap: 18px;
  row-gap: 0;
}

.account-section {
  grid-area: accounts;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.section-heading {
  min-height: 28px;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading > label,
.section-heading > div > strong {
  color: #26384f;
  font-size: 13px;
  font-weight: 800;
}

.section-heading > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.section-heading > div > span {
  overflow: hidden;
  color: #6f7e91;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count-chip,
.privacy-mark {
  min-height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: #718095;
  background: #f2f5f8;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

#accountInput,
input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid #dce3ec;
  color: #24364d;
  background: var(--surface-soft);
  outline: 0;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

#accountInput {
  height: 230px;
  min-height: 230px;
  flex: 1 1 auto;
  padding: 16px 18px;
  resize: vertical;
  border-radius: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  box-shadow: inset 0 1px 2px rgba(31, 45, 61, 0.02);
}

#accountInput::placeholder,
input::placeholder {
  color: #9aa7b7;
}

#accountInput:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.14);
}

.field-hint {
  min-height: 52px;
  margin: 0;
  padding: 12px 0 10px;
  grid-area: hint;
  color: #69788c;
  font-size: 11px;
  line-height: 1.55;
}

.mode-group {
  margin: 0;
  grid-area: modes;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.mode-option,
.policy-option {
  position: relative;
  min-width: 0;
  min-height: 80px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  border: 1px solid #e5eaf0;
  border-radius: 11px;
  color: #5e6c7d;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.option-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #60738e;
  background: #eef2f7;
  transition: color var(--ease), background-color var(--ease);
}

.option-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.option-copy {
  min-width: 0;
}

.option-copy strong {
  display: block;
  color: #34445a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.option-copy small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #6f7e91;
  font-size: 10px;
  line-height: 1.45;
}

.option-radio {
  width: 18px;
  height: 18px;
  margin: 0;
  justify-self: end;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #98a9bf;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease);
}

.option-radio:checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px #ffffff;
}

.option-radio:disabled {
  cursor: not-allowed;
}

.mode-option:hover,
.policy-option:hover {
  border-color: #d6dee8;
  background: #ffffff;
  transform: translateY(-1px);
}

.mode-option:focus-within,
.policy-option:focus-within {
  outline: 2px solid rgba(255, 122, 26, 0.32);
  outline-offset: 2px;
}

.mode-option.is-selected,
.policy-option.is-selected {
  border-color: var(--accent-border);
  background: #fffaf6;
  box-shadow: 0 5px 14px rgba(255, 122, 26, 0.08);
}

.mode-option.is-selected strong,
.policy-option.is-selected strong {
  color: #bd5a16;
}

.mode-option.is-selected .option-icon,
.policy-option.is-selected .option-icon {
  color: var(--accent);
  background: var(--accent-soft);
}

.policy-heading {
  min-height: 52px;
  margin: 0;
  padding: 10px 0;
  grid-area: policy-heading;
}

.password-policy {
  min-width: 0;
  grid-area: policies;
  transition: opacity var(--ease);
}

.password-policy.is-disabled {
  opacity: 0.46;
  pointer-events: none;
}

.policy-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
}

.policy-fields {
  min-height: 54px;
  margin-top: 9px;
  padding: 8px 0 0;
  border-top: 1px solid #edf0f4;
}

.policy-fields > label {
  display: block;
  margin-bottom: 6px;
  color: #5f6e81;
  font-size: 11px;
  font-weight: 700;
}

.icon-button {
  height: 100%;
  border: 0;
  color: #68778a;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--accent-hover);
  background: var(--accent-soft);
}

.password-input {
  height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-input input,
#appendSuffix {
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12px;
}

.password-input input {
  padding-right: 64px;
  grid-column: 1 / -1;
  grid-row: 1;
}

.icon-button {
  z-index: 1;
  min-width: 54px;
  padding: 0 9px;
  grid-column: 2;
  grid-row: 1;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.task-log-panel {
  grid-area: log;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  background: var(--surface-soft);
  box-shadow: inset 0 1px 2px rgba(31, 45, 61, 0.02);
}

.task-log-heading {
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.task-log-heading > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.task-log-heading strong {
  color: #26384f;
  font-size: 12px;
}

.task-log-heading > div > span {
  color: #6f7e91;
  font-size: 10px;
}

.task-log-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

.task-log-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.task-log {
  min-height: 0;
  margin-top: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d9e0e8 transparent;
}

.task-log-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: #94a0b0;
  font-size: 11px;
  text-align: center;
}

.task-log-entry {
  min-height: 26px;
  padding: 4px 5px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-radius: 7px;
  color: #5f6e80;
  font-size: 10px;
}

.task-log-entry:hover {
  background: #f2f5f8;
}

.task-log-entry i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b95a3;
}

.task-log-entry[data-state="processing"] i,
.task-log-entry[data-state="queued"] i {
  background: #2f7dff;
}

.task-log-entry[data-state="login_ok"] i,
.task-log-entry[data-state="password_changed"] i {
  background: var(--success);
}

.task-log-entry[data-level="attention"] i {
  background: var(--danger);
}

.task-log-entry span {
  min-width: 0;
  overflow: hidden;
  color: #33465e;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-log-entry b {
  color: #7a8798;
  font-weight: 650;
  white-space: nowrap;
}

.task-controls {
  grid-area: controls;
  min-height: 44px;
  margin-top: 18px;
  align-self: start;
  display: flex;
  align-items: center;
  gap: 9px;
}

.primary-action,
.secondary-action,
.result-action {
  min-height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), color var(--ease), background-color var(--ease), box-shadow var(--ease);
}

.primary-action {
  min-width: 190px;
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(255, 122, 26, 0.24);
}

.primary-action:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  box-shadow: 0 12px 24px rgba(255, 122, 26, 0.28);
  transform: translateY(-1px);
}

.secondary-action {
  min-width: 64px;
  border: 1px solid #d7dfe8;
  color: #42546b;
  background: #ffffff;
}

.secondary-action:hover:not(:disabled),
.result-action:hover:not(:disabled) {
  border-color: var(--accent-border);
  color: var(--accent-hover);
  background: #fffaf6;
}

.primary-action:disabled,
.secondary-action:disabled,
.result-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-feedback {
  min-width: 0;
  margin: 0 0 0 4px;
  color: #a5575c;
  font-size: 11px;
  line-height: 1.5;
}

.form-feedback.is-ok {
  color: #168354;
}

.progress-panel {
  padding: 18px 20px 20px;
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.progress-track i {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.task-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.task-stats > div {
  position: relative;
  min-width: 0;
  min-height: 82px;
  padding: 0 18px 0 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  border: 1px solid #e1e6ed;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(31, 45, 61, 0.07);
}

.task-stats > div::before {
  content: "";
  position: absolute;
  left: 23px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: url("/logo-1.png") center / contain no-repeat;
}

.task-stats > div[data-stat="running"]::before {
  background-image: url("/logo-2.png");
}

.task-stats > div[data-stat="checked"]::before {
  background-image: url("/logo-4.png");
}

.task-stats > div[data-stat="changed"]::before {
  background-image: url("/logo-3.png?v=20260825-green-check-1");
}

.task-stats > div[data-stat="attention"]::before {
  background-image: url("/logo-5.png");
}

.task-stats span {
  min-width: 0;
  overflow: hidden;
  color: #6f7d90;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-stats strong {
  flex: 0 0 auto;
  color: #17263a;
  font-size: 23px;
  font-weight: 800;
}

.results-panel {
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.result-heading {
  min-height: 58px;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e8ecf1;
}

.result-heading h2 {
  margin: 0;
  color: #26384f;
  font-size: 13px;
  font-weight: 800;
}

.result-heading-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#taskSummary {
  max-width: 320px;
  overflow: hidden;
  color: #778599;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-action {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dce3eb;
  border-radius: 9px;
  color: #596a7e;
  background: #f8fafc;
  font-size: 11px;
}

.result-list {
  min-height: 190px;
}

.result-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #94a0b0;
  font-size: 11px;
  text-align: center;
}

.result-item {
  min-height: 82px;
  padding: 11px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #edf0f4;
  background: #ffffff;
  transition: background-color var(--ease);
}

.result-primary {
  min-width: 0;
}

.result-item:last-child {
  border-bottom: 0;
}

.result-item:hover {
  background: #fbfcfe;
}

.result-email {
  overflow: hidden;
  color: #26384f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-detail {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #7d8a9b;
  font-size: 11px;
  line-height: 1.45;
}

.result-progress {
  width: min(100%, 720px);
  margin-top: 8px;
}

.result-progress-heading {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #718095;
  font-size: 10px;
  line-height: 1.3;
}

.result-progress-heading span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-progress-heading strong {
  flex: 0 0 auto;
  color: #4e6076;
  font-size: 10px;
}

.result-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.result-progress-track i {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.progress-track i::after,
.result-progress-track i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 18%;
  min-width: 22px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.32);
  transform: translateX(-130%);
  animation: progress-flow 1800ms ease-in-out infinite;
}

.progress-track[data-progress-state="idle"] i::after,
.progress-track[data-progress-state="complete"] i::after,
.result-item[data-progress-state="success"] .result-progress-track i::after,
.result-item[data-progress-state="attention"] .result-progress-track i::after {
  display: none;
}

@keyframes progress-flow {
  0% { transform: translateX(-130%); }
  70%,
  100% { transform: translateX(650%); }
}

.result-item[data-progress-state="success"] .result-progress-track i {
  background: var(--success);
}

.result-item[data-progress-state="attention"] .result-progress-track i {
  background: var(--warning);
}

.result-meta {
  max-width: min(48vw, 420px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.state-chip,
.copy-new-password {
  min-height: 27px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.state-chip {
  color: #667589;
  background: #edf1f5;
}

.state-chip.is-success {
  color: #168354;
  background: #e8f6ef;
}

.state-chip.is-warning {
  color: #b56a18;
  background: #fff3e2;
}

.copy-new-password {
  max-width: 230px;
  overflow: hidden;
  border: 1px solid #f2d6b7;
  color: #9b5a1d;
  background: #fff8ef;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  cursor: pointer;
}

.copy-new-password:hover {
  border-color: var(--accent-border);
  color: var(--accent-hover);
}

body.safety-dialog-open {
  overflow: hidden;
}

.safety-dialog {
  width: min(600px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  color: #f8fafc;
  background: transparent;
  box-shadow: none;
}

.safety-dialog::backdrop {
  background: rgba(5, 8, 13, 0.88);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.safety-dialog-content {
  min-height: 520px;
  padding: 42px 46px 38px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 0;
  text-align: center;
  background: transparent;
  box-shadow: none;
}

.safety-warning-icon {
  width: min(168px, 42vw);
  aspect-ratio: 1;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #ff3d4a;
  filter: drop-shadow(0 0 9px rgba(255, 42, 55, 0.72)) drop-shadow(0 0 30px rgba(255, 42, 55, 0.38));
  animation: safety-warning-glow 1.35s ease-in-out infinite;
  will-change: filter, transform;
}

.safety-warning-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes safety-warning-glow {
  0%,
  100% {
    color: #ff4b56;
    filter: drop-shadow(0 0 8px rgba(255, 42, 55, 0.58)) drop-shadow(0 0 24px rgba(255, 42, 55, 0.28));
    transform: scale(0.985);
  }
  50% {
    color: #ff1f31;
    filter: drop-shadow(0 0 16px rgba(255, 42, 55, 0.94)) drop-shadow(0 0 46px rgba(255, 42, 55, 0.62));
    transform: scale(1.035);
  }
}

.safety-dialog-kicker {
  margin: 18px 0 0;
  color: #ff6b74;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.4;
}

.safety-dialog h2 {
  margin: 7px 0 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.35;
}

.safety-dialog-scope {
  min-height: 24px;
  margin: 12px 0 0;
  padding: 4px 10px;
  border: 1px solid rgba(255, 107, 116, 0.34);
  border-radius: 999px;
  color: #ffb3b8;
  background: rgba(229, 72, 77, 0.1);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.4;
}

.safety-dialog-message {
  max-width: 480px;
  margin: 18px 0 0;
  color: #ffd8db;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
}

.safety-dialog-message strong {
  color: #ff6872;
  font-weight: 900;
}

.safety-dialog-actions {
  width: min(100%, 430px);
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.safety-dialog-cancel,
.safety-dialog-confirm {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.safety-dialog-cancel {
  border: 1px solid #454b56;
  color: #e4e8ef;
  background: #22262e;
}

.safety-dialog-cancel:hover {
  border-color: #626a78;
  background: #2a2f38;
}

.safety-dialog-confirm {
  border: 1px solid #ff5963;
  color: #ffffff;
  background: #cb373e;
  box-shadow: 0 8px 24px rgba(229, 72, 77, 0.32);
}

.safety-dialog-confirm:hover {
  border-color: #ff737b;
  background: #b42d34;
  box-shadow: 0 10px 30px rgba(229, 72, 77, 0.42);
}

.safety-dialog-cancel:active,
.safety-dialog-confirm:active {
  transform: translateY(1px);
}

.safety-dialog-cancel:focus-visible,
.safety-dialog-confirm:focus-visible {
  outline: 2px solid rgba(255, 104, 114, 0.72);
  outline-offset: 3px;
}

.safety-dialog-confirm:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 1240px) {
  .entry-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "accounts"
      "hint"
      "log"
      "modes"
      "policy-heading"
      "policies"
      "controls";
  }

  .task-log-panel {
    min-height: 220px;
    margin-top: 4px;
  }

  .mode-group {
    margin-top: 14px;
  }

  .policy-heading {
    margin-top: 14px;
  }
}

@media (max-width: 1120px) {
  .task-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mailcom-shell {
    width: calc(100% - 20px);
    margin-bottom: 20px;
    padding-top: 14px;
  }

  .product-nav-shell {
    min-height: 54px;
    height: 54px;
    padding: 0 9px 0 12px;
    gap: 10px;
  }

  .product-nav-title {
    display: none;
  }

  .product-nav-actions {
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .product-nav-actions::-webkit-scrollbar {
    display: none;
  }

  .product-nav-link {
    min-height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }

  .password-workspace {
    margin-top: 14px;
    gap: 14px;
  }

  .entry-grid {
    grid-template-areas:
      "accounts"
      "hint"
      "modes"
      "log"
      "policy-heading"
      "policies"
      "controls";
  }

  .entry-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .entry-panel > form {
    padding: 20px;
    border-radius: 22px;
  }

  #accountInput {
    height: 220px;
    min-height: 220px;
    border-radius: 14px;
  }

  .task-log-panel {
    min-height: 180px;
    margin-top: 14px;
  }

  .mode-group {
    margin-top: 0;
  }

  .progress-panel,
  .results-panel {
    border-radius: 20px;
  }

  .task-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-heading-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #taskSummary {
    flex: 1 1 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .mode-group,
  .policy-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .entry-panel {
    padding: 16px;
  }

  .section-heading > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .task-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .primary-action {
    min-width: 0;
    flex: 1 1 calc(70% - 5px);
  }

  .secondary-action {
    flex: 1 1 calc(30% - 5px);
  }

  .form-feedback {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .task-stats {
    gap: 8px;
  }

  .task-stats > div {
    min-height: 74px;
    padding: 0 12px 0 52px;
  }

  .task-stats > div::before {
    left: 15px;
    width: 34px;
    height: 34px;
  }

  .task-stats strong {
    font-size: 20px;
  }

  .result-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-meta {
    max-width: 100%;
    justify-content: space-between;
  }

  .copy-new-password {
    max-width: 65vw;
  }

  .safety-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .safety-dialog-content {
    min-height: 0;
    padding: 26px 20px 22px;
  }

  .safety-warning-icon {
    width: min(116px, 36vw);
  }

  .safety-dialog-kicker {
    margin-top: 12px;
  }

  .safety-dialog h2 {
    font-size: 20px;
  }

  .safety-dialog-message {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
  }

  .safety-dialog-actions {
    margin-top: 22px;
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 540px) {
  .safety-dialog-content {
    min-height: 0;
    padding: 16px 20px;
  }

  .safety-warning-icon {
    width: 88px;
  }

  .safety-dialog-kicker {
    margin-top: 6px;
  }

  .safety-dialog h2 {
    margin-top: 4px;
    font-size: 20px;
  }

  .safety-dialog-scope {
    margin-top: 7px;
  }

  .safety-dialog-message {
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.5;
  }

  .safety-dialog-actions {
    margin-top: 12px;
  }

  .safety-dialog-cancel,
  .safety-dialog-confirm {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }

  .progress-track i,
  .result-progress-track i {
    will-change: auto;
  }

  .progress-track i::after,
  .result-progress-track i::after {
    display: none;
  }

  .safety-warning-icon {
    filter: drop-shadow(0 0 12px rgba(255, 42, 55, 0.72));
    will-change: auto;
  }
}

/* Unified navigation: matches the batch-query header across every feature page. */
.product-nav-shell {
  position: relative; z-index: 5; width: min(1420px, calc(100% - 64px)); min-height: 56px; height: 56px; margin: 24px auto 0; padding: 0 12px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; border: 1px solid rgba(226, 231, 238, 0.92); border-radius: 999px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 28px rgba(31, 45, 61, 0.075), 0 1px 2px rgba(31, 45, 61, 0.035); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.product-nav-logo { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; color: #121826; background: #f4f6f8; font-size: 17px; font-weight: 800; line-height: 1; text-decoration: none; }
.product-nav-logo img { width: 21px; height: 21px; display: block; object-fit: contain; }
.product-nav-shell > .product-nav-title { flex: 0 1 auto; display: block; min-width: 0; margin-left: 10px; padding-left: 14px; overflow: hidden; border-left: 1px solid #edf0f3; color: #17202c; font-size: 17px; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.product-nav-actions { min-width: 0; margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.product-nav-link { min-height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 9px; border-radius: 10px; color: #2b3441; font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; transition: color 150ms ease, background-color 150ms ease; }
.product-nav-link:hover { color: #171d27; background: #f5f6f8; }
.product-nav-link.is-active, .product-nav-link.is-active:hover { color: #df762c; background: #fff1e8; }
.product-nav-logo:focus-visible, .product-nav-link:focus-visible { outline: 2px solid #ef9a5a; outline-offset: 2px; }
@media (max-width: 920px) { .product-nav-shell { width: calc(100% - 20px); min-height: 54px; height: 54px; margin-top: 14px; padding: 0 9px 0 12px; gap: 10px; } .product-nav-actions { justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; } .product-nav-actions::-webkit-scrollbar { display: none; } .product-nav-shell > .product-nav-title { display: none; } .product-nav-link { min-height: 32px; padding: 0 10px; font-size: 12px; } }

/* Final unified header geometry: identical to the batch-query header. */
.product-nav-shell { width: min(1680px, calc(100% - 32px)); min-height: 56px; height: 56px; margin: 24px auto 0; }
@media (max-width: 920px) { .product-nav-shell { width: calc(100% - 20px); min-height: 54px; height: 54px; margin-top: 14px; } }


/* Final cross-page navigation alignment: use the batch-query header as the source of truth. */
.product-nav-shell { position: relative; z-index: 5; width: min(1680px, calc(100% - 32px)); min-height: 56px; height: 56px; margin: 24px auto 0; padding: 0 12px 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; border: 1px solid rgba(226,231,238,.92); border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 10px 28px rgba(31,45,61,.075), 0 1px 2px rgba(31,45,61,.035); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.product-nav-logo { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 8px; background: #f4f6f8; }
.product-nav-logo img { width: 21px; height: 21px; display: block; object-fit: contain; }
.product-nav-shell > .product-nav-title, .product-nav-title { flex: 0 1 auto; display: block; min-width: 0; margin-left: 10px; padding-left: 14px; overflow: hidden; border-left: 1px solid #edf0f3; color: #17202c; font-size: 17px; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.product-nav-actions { min-width: 0; margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.product-nav-link { min-height: 34px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 13px; border-radius: 10px; color: #2b3441; background: transparent; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; }
.product-nav-link:hover { color: #171d27; background: #f5f6f8; }
.product-nav-link.is-active, .product-nav-link.is-active:hover { color: #df762c; background: #fff1e8; }
@media (max-width: 720px) { .product-nav-shell { width: calc(100% - 20px); min-height: 54px; height: 54px; margin-top: 14px; padding: 0 9px 0 12px; gap: 10px; } .product-nav-title, .product-nav-shell > .product-nav-title { display: none; } .product-nav-actions { justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; } .product-nav-actions::-webkit-scrollbar { display: none; } .product-nav-link { min-height: 32px; padding: 0 11px; font-size: 12px; } }


/* Feature-page nav alignment: remove the extra shell offset above the nav. */
.mailcom-shell { padding-top: 0; }
@media (max-width: 760px) {
  .mailcom-shell { padding-top: 0; }
}
