/* MailHost's look: white pages, soft cards, clear buttons and messages. Loaded after setup.css and
   site.css by both layouts, so it refines them without changing any page's structure. */

:root {
    --mh-blue: #1a73e8;
    --mh-blue-dark: #155fc4;
    --mh-blue-soft: #eaf2fe;
    --mh-ink: #18213a;
    --mh-muted: #5f6b85;
    --mh-line: #e6eaf1;
    --mh-soft: #f6f8fb;
    --mh-page: #f3f5f9;
    --mh-green: #16a34a;
    --mh-green-soft: #e8f7ee;
    --mh-red: #dc2626;
    --mh-red-soft: #fdeeee;
    --mh-amber: #b45309;
    --mh-amber-soft: #fff6e6;
    --mh-radius: 14px;
    --mh-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.05);
}

body.setup-body {
    background: var(--mh-page);
    color: var(--mh-ink);
    -webkit-font-smoothing: antialiased;
}

/* ---- Content areas: a soft off-white, easy on the eyes; cards stay white -- */

.setup-main,
.setup-content,
.setup-welcome,
.app-content {
    background: var(--mh-page);
}

.app-content {
    padding: 32px 44px 56px;
}

.setup-topbar {
    background: var(--mh-page);
    border-bottom-color: #e3e7ef;
    padding: 12px 28px;
}

.setup-user-button {
    background: #fff;
    border: 1px solid var(--mh-line);
    transition: background 0.15s;
}

.setup-user-button:hover {
    background: var(--mh-blue-soft);
}

.dropdown-menu {
    border-color: var(--mh-line);
    border-radius: 12px;
    box-shadow: var(--mh-shadow);
    padding: 6px;
}

.dropdown-item {
    border-radius: 8px;
}

/* ---- Page header -------------------------------------------------------- */

.setup-page-title {
    padding: 28px 44px 6px;
    border-bottom: none;
}

.setup-page-title h1,
.page-head h1 {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-head p {
    color: var(--mh-muted);
    margin: 6px 0 0;
    max-width: 680px;
}

.page-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 9px 18px;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-sm {
    border-radius: 8px;
    padding: 5px 12px;
}

.btn-lg {
    padding: 12px 24px;
}

.btn-primary,
.setup-option-button {
    background: var(--mh-blue);
    border-color: var(--mh-blue);
}

.btn-primary:hover,
.btn-primary:focus,
.setup-option-button:hover {
    background: var(--mh-blue-dark);
    border-color: var(--mh-blue-dark);
}

.btn-outline-primary {
    color: var(--mh-blue);
    border-color: #c9dbf8;
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    color: var(--mh-blue);
    background: var(--mh-blue-soft);
    border-color: #a9c6f4;
}

.btn-outline-secondary {
    color: var(--mh-ink);
    border-color: var(--mh-line);
    background: #fff;
}

.btn-outline-secondary:hover {
    color: var(--mh-ink);
    background: var(--mh-soft);
    border-color: #d5dbe6;
}

.btn-outline-danger {
    border-color: #f3c4c4;
}

.btn-link {
    font-weight: 500;
}

.setup-option-button {
    min-width: 0;
    font-size: 1rem;
}

/* ---- Forms -------------------------------------------------------------- */

.form-control,
.form-select,
.input-group-text {
    border-color: #d9dfe9;
    border-radius: 10px;
    padding: 10px 14px;
}

.form-control-lg {
    padding: 12px 16px;
    font-size: 1.1rem;
}

.form-select {
    padding-right: 38px;
}

.input-group-text {
    background: var(--mh-soft);
    color: var(--mh-muted);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--mh-blue);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.form-text {
    color: var(--mh-muted);
}

/* ---- Messages ----------------------------------------------------------- */

.alert {
    position: relative;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 14px 18px 14px 50px;
}

/* The icon sits in the left padding, so the message text flows normally. */
.alert::before {
    position: absolute;
    left: 16px;
    top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.alert-success {
    background: var(--mh-green-soft);
    border-color: #c6ead3;
    color: #14532d;
}

.alert-success::before {
    content: "\2713";
    background: var(--mh-green);
}

.alert-danger {
    background: var(--mh-red-soft);
    border-color: #f6caca;
    color: #7f1d1d;
}

.alert-danger::before {
    content: "!";
    background: var(--mh-red);
}

.alert-warning {
    background: var(--mh-amber-soft);
    border-color: #f6dfb3;
    color: #713f12;
}

.alert-warning::before {
    content: "!";
    background: #d97706;
}

.alert-info {
    background: var(--mh-blue-soft);
    border-color: #cfe0fb;
    color: #1e3a8a;
}

.alert-info::before {
    content: "i";
    background: var(--mh-blue);
}

.setup-flash {
    margin: 20px 44px 0;
}

.app-content > .alert {
    margin-bottom: 20px;
}

/* ---- Cards and panels --------------------------------------------------- */

.setup-panel,
.card,
.setup-option-card,
.mh-card {
    background: #fff;
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-radius);
    box-shadow: var(--mh-shadow);
}

.card-header {
    background: #fff;
    border-bottom-color: var(--mh-line);
    padding: 16px 20px;
    border-top-left-radius: var(--mh-radius) !important;
    border-top-right-radius: var(--mh-radius) !important;
}

.card-body {
    padding: 20px;
}

.mh-card {
    padding: 24px;
}

.mh-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.mh-card-sub {
    color: var(--mh-muted);
    font-size: 0.92rem;
    margin: 0 0 18px;
}

/* ---- Tables ------------------------------------------------------------- */

.mh-table {
    margin: 0;
}

.mh-table thead th,
.setup-users-table th {
    background: var(--mh-soft);
    color: var(--mh-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--mh-line);
    padding: 12px 16px;
}

.mh-table td,
.setup-users-table td {
    padding: 14px 16px;
    border-color: var(--mh-line);
}

.mh-table tbody tr:last-child td,
.setup-users-table tbody tr:last-child td {
    border-bottom: none;
}

.mh-table tbody tr:hover td,
.setup-users-table tbody tr:hover td {
    background: #fafbfd;
}

.setup-panel.p-0 {
    overflow: hidden;
}

/* ---- Status pills ------------------------------------------------------- */

.setup-status,
.mh-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    background: #eef1f6;
    color: var(--mh-muted);
}

.setup-status::before,
.mh-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.setup-status.is-ok,
.mh-pill.is-ok {
    background: var(--mh-green-soft);
    color: #15803d;
}

.setup-status.is-pending,
.mh-pill.is-pending {
    background: var(--mh-amber-soft);
    color: var(--mh-amber);
}

.mh-pill.is-muted {
    background: #f1f3f7;
    color: var(--mh-muted);
}

.mh-pill.is-blue {
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
}

.mh-pill.no-dot::before {
    display: none;
}

/* ---- Avatars ------------------------------------------------------------ */

.mh-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
    font-weight: 700;
    font-size: 0.9rem;
}

.mh-avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.15rem;
}

/* ---- Setup wizard: hero pages ------------------------------------------- */

.setup-hero-page {
    padding: 36px 24px 56px;
}

.setup-hero-page h2 {
    font-size: 1.55rem;
    letter-spacing: -0.01em;
}

.setup-hero-page .setup-subtitle,
.setup-subtitle {
    color: var(--mh-muted);
    font-size: 1.02rem;
}

.setup-hero-globe {
    width: 96px;
    height: 96px;
    padding: 22px;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
}

.setup-big-check {
    width: 88px;
    height: 88px;
    padding: 18px;
    background: var(--mh-green);
    box-shadow: 0 0 0 10px var(--mh-green-soft);
}

.setup-footer {
    background: var(--mh-page);
    border-top: 1px solid var(--mh-line);
    padding: 14px 16px;
    gap: 12px;
}

/* Small badge above a hero title, e.g. "Step 1 of 3". */
.mh-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
    font-size: 0.8rem;
    font-weight: 600;
}

/* A way to finish a step (GoDaddy token, Cloudflare, by hand): one card each. */
.mh-methods {
    display: grid;
    gap: 16px;
    max-width: 720px;
    margin: 28px auto 0;
    text-align: left;
}

.mh-method {
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-radius);
    box-shadow: var(--mh-shadow);
}

.mh-method.is-recommended {
    border-color: #b9d2f7;
    box-shadow: 0 0 0 3px var(--mh-blue-soft), var(--mh-shadow);
}

.mh-method-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.mh-method-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.mh-method p {
    color: var(--mh-muted);
}

.mh-steps {
    counter-reset: mh-step;
    list-style: none;
    padding: 0;
    margin: 14px 0 18px;
}

.mh-steps li {
    counter-increment: mh-step;
    position: relative;
    padding: 0 0 10px 36px;
    font-size: 0.94rem;
}

.mh-steps li::before {
    content: counter(mh-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mh-steps code {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--mh-soft);
    color: #b4235a;
    font-size: 0.85em;
}

.mh-note {
    display: flex;
    gap: 8px;
    margin: 12px 0 0;
    color: var(--mh-muted);
    font-size: 0.86rem;
}

.mh-note strong {
    color: var(--mh-ink);
}

.mh-manual-toggle {
    margin-top: 22px;
}

.setup-manual {
    max-width: 720px;
}

.setup-manual.collapse.show,
.setup-manual.collapsing {
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-radius);
    box-shadow: var(--mh-shadow);
}

/* ---- Welcome page ------------------------------------------------------- */

.setup-welcome {
    padding: 40px 24px 56px;
}

.setup-hero {
    width: 260px;
}

.setup-welcome h2 {
    margin-top: 20px;
    font-size: 2.1rem;
    letter-spacing: -0.02em;
}

.setup-option-card {
    max-width: 480px;
    padding: 28px 30px;
    text-align: left;
}

.setup-option-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.setup-option-card p {
    font-size: 0.94rem;
    margin-bottom: 20px;
}

/* "Verify → Connect → Create" under the domain form. */
.mh-journey {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 24px;
    max-width: 600px;
    margin: 28px auto 0;
    padding: 0;
    list-style: none;
    color: var(--mh-muted);
    font-size: 0.9rem;
}

.mh-journey li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mh-journey b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
    font-size: 0.78rem;
}

/* ---- Progress page ------------------------------------------------------ */

.mh-progress-ring {
    width: 64px;
    height: 64px;
    border-width: 5px;
    color: var(--mh-blue);
}

.mh-progress-list {
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px auto 0;
    padding: 20px 26px;
    list-style: none;
    text-align: left;
    background: #fff;
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-radius);
}

.mh-progress-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--mh-muted);
}

.mh-progress-list li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c9d3e3;
}

/* ---- Done page ---------------------------------------------------------- */

.mh-next {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    max-width: 760px;
    margin: 32px auto 0;
    text-align: left;
}

.mh-next a {
    display: block;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-radius);
    box-shadow: var(--mh-shadow);
    transition: border-color 0.15s, transform 0.15s;
}

.mh-next a:hover {
    border-color: #a9c6f4;
    transform: translateY(-2px);
}

.mh-next strong {
    display: block;
    margin-bottom: 4px;
}

.mh-next span {
    color: var(--mh-muted);
    font-size: 0.9rem;
}

.mh-next .mh-next-icon {
    display: flex;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    padding: 9px;
    border-radius: 10px;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
}

.mh-next-icon svg {
    width: 100%;
    height: 100%;
}

/* ---- Dashboard ---------------------------------------------------------- */

.mh-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    padding: 20px;
}

.mh-stat-icon {
    display: flex;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 11px;
    border-radius: 12px;
    background: var(--mh-blue-soft);
    color: var(--mh-blue);
}

.mh-stat-icon svg {
    width: 100%;
    height: 100%;
}

.mh-stat-icon.is-green {
    background: var(--mh-green-soft);
    color: var(--mh-green);
}

.mh-stat-icon.is-amber {
    background: var(--mh-amber-soft);
    color: #d97706;
}

.mh-stat-label {
    color: var(--mh-muted);
    font-size: 0.88rem;
}

.mh-stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
}

/* ---- Toolbar (Domains) -------------------------------------------------- */

.mh-segmented .btn {
    padding: 6px 12px;
}

@media (max-width: 768px) {
    .setup-page-title {
        padding: 20px 16px 4px;
    }

    .setup-flash {
        margin: 16px 16px 0;
    }

    .app-content {
        padding: 20px 16px 40px;
    }

    .mh-method,
    .mh-card {
        padding: 18px;
    }
}

/* ---- Type --------------------------------------------------------------- */

body.setup-body {
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    font-feature-settings: "cv11", "ss01";
    line-height: 1.55;
}

.setup-main h1, .setup-main h2, .setup-main h3, .setup-main h4,
.auth-card h1,
.mh-card-title {
    color: var(--mh-ink);
    letter-spacing: -0.015em;
}

.setup-subtitle,
.page-head p,
.mh-method p,
.mh-card-sub,
.form-text {
    color: #4f5b75;
}

.mh-method p,
.mh-steps li {
    font-size: 0.95rem;
}

.mh-steps li {
    color: #2b3550;
    line-height: 1.55;
}

.mh-steps a {
    font-weight: 600;
    text-decoration: none;
}

.mh-steps a:hover {
    text-decoration: underline;
}

.form-label {
    color: #2b3550;
}

/* ---- Compact step pages: everything fits on one screen ------------------ */

.setup-hero-page.is-compact {
    padding: 4px 24px 28px;
}

.setup-hero-page.is-compact > .alert {
    margin-bottom: 14px !important;
}

.setup-hero-page.is-compact .mh-eyebrow {
    margin-bottom: 6px;
}

.setup-hero-page.is-compact h2 {
    font-size: 1.45rem;
    margin: 4px 0 6px;
}

.setup-hero-page.is-compact .setup-subtitle {
    margin-bottom: 18px;
}

.setup-hero-page.is-compact .mh-methods {
    margin-top: 0;
}

.setup-hero-page.is-compact .mh-method {
    padding: 18px 22px;
}

.setup-hero-page.is-compact .mh-steps {
    margin: 10px 0 14px;
}

.setup-hero-page.is-compact .mh-steps li {
    padding-bottom: 6px;
}

.setup-hero-page.is-compact .mh-note {
    margin-top: 8px;
}

.setup-hero-page.is-compact .mh-manual-toggle {
    margin-top: 16px;
}

.setup-page-title {
    padding-top: 22px;
}

/* ---- Forms in cards (Add user) ------------------------------------------ */

.mh-form-section {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mh-blue);
    margin: 0 0 12px;
}

.mh-option {
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--mh-soft);
    border: 1px solid var(--mh-line);
    border-radius: 12px;
}

.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--mh-blue);
    border-color: var(--mh-blue);
}

.form-switch .form-check-input {
    width: 2.4em;
    height: 1.3em;
    margin-top: 0.15em;
}

.form-check-label {
    margin-left: 6px;
    font-weight: 500;
    cursor: pointer;
}

/* The pencil next to the domain name keeps its small square size. */
.btn.setup-pencil {
    padding: 6px;
}

/* A list that uses the full width of the page (Users). */
.setup-panel.mh-wide {
    max-width: none;
}

/* ---- Account button (top right) ----------------------------------------- */

.mh-account-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    padding: 5px 12px 5px 5px;
    border: 1px solid #d9dfe9;
    border-radius: 999px;
    background: #fff;
    color: var(--mh-ink);
    font-size: 0.92rem;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mh-account-button:hover,
.mh-account-button[aria-expanded="true"] {
    border-color: #a9c6f4;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.mh-account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mh-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.mh-account-email {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mh-account-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--mh-muted);
}

.mh-account-menu {
    min-width: 260px;
}

.mh-account-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
}

.mh-account-menu .dropdown-item {
    padding: 8px 10px;
    font-weight: 500;
}

@media (max-width: 576px) {
    .mh-account-email {
        display: none;
    }
}

/* Progress page: the stage being worked on, and the ones already done. */
.mh-progress-list li.is-active {
    color: var(--mh-ink);
    font-weight: 600;
}

.mh-progress-list li.is-active::before {
    background: var(--mh-blue);
    box-shadow: 0 0 0 4px var(--mh-blue-soft);
}

.mh-progress-list li.is-done {
    color: #15803d;
}

.mh-progress-list li.is-done::before {
    background: var(--mh-green);
}

/* The active-domain star on the Domains list: filled for the active domain, outlined (clickable,
   Super Administrator only) for the other verified domains. */
.mh-star {
    padding: 0;
    border: none;
    background: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #c4cad6;
}

button.mh-star {
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

button.mh-star:hover,
button.mh-star:focus-visible {
    color: #f5b301;
    transform: scale(1.15);
}

.mh-star.is-active {
    color: #f5b301;
}

/* The 6-digit code page: one box per digit. */
.mh-code-boxes {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.mh-code-box {
    width: 100%;
    max-width: 52px;
    height: 58px;
    padding: 0;
    border: 1px solid #d9dfe9;
    border-radius: 10px;
    background: #fff;
    color: var(--mh-ink);
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mh-code-box:focus {
    outline: none;
    border-color: var(--mh-blue);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12);
}

.mh-code-single {
    letter-spacing: 0.5em;
    text-align: center;
    font-weight: 700;
}

/* The Domains list, its toolbar and its cards: wider than a plain panel, but not edge to edge,
   since the list has only a few columns. */
.mh-domains-width {
    max-width: 1200px;
}

/* Sign-up page: the live password checklist and strength bar. */
.mh-pw-check {
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--mh-soft);
    border: 1px solid var(--mh-line);
    border-radius: 10px;
}

.mh-pw-bar {
    height: 6px;
    background: #e3e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.mh-pw-bar > div {
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.2s, background 0.2s;
}

.mh-pw-bar .level-0,
.mh-pw-bar .level-1 { background: var(--mh-red); }
.mh-pw-bar .level-2 { background: #d97706; }
.mh-pw-bar .level-3 { background: var(--mh-green); }
.mh-pw-bar .level-4 { background: #15803d; }

.mh-pw-rules {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.86rem;
}

.mh-pw-rules li {
    padding: 2px 0 2px 22px;
    position: relative;
    color: var(--mh-muted);
}

.mh-pw-rules li::before {
    content: "\2022";
    position: absolute;
    left: 6px;
}

.mh-pw-rules li.is-ok {
    color: #15803d;
}

.mh-pw-rules li.is-ok::before {
    content: "\2713";
    left: 2px;
    font-weight: 700;
}

.mh-pw-rules li.is-bad {
    color: var(--mh-red);
}

.mh-pw-rules li.is-bad::before {
    content: "\2717";
    left: 2px;
    font-weight: 700;
}

/* The checklist folds away once every rule passes. */
.mh-pw-rules {
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

.mh-pw-rules.is-collapsed {
    max-height: 0;
    opacity: 0;
}

/* The ⋮ "more actions" button on a Users row. */
.mh-row-menu {
    font-size: 1.25rem;
    line-height: 1;
    text-decoration: none;
}

/* Settings: the account name and the password side by side, stacked on narrow screens. */
.mh-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
    max-width: 1000px;
}

.mh-settings-grid-width {
    max-width: 1000px;
}

/* "+ Add domain" and "+ Add user": a standard size, smaller than a form's main button. */
.btn.mh-btn-compact {
    padding: 6px 14px;
    font-size: 0.9rem;
}

/* ---- Capability Section & Pills ----------------------------------------- */
.capability-bar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.capability-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid var(--mh-line);
    background-color: var(--mh-soft);
    color: var(--mh-ink);
    transition: all 0.15s ease-in-out;
}

.capability-pill:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.capability-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.capability-pill.cap-api {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.capability-pill.cap-api .capability-dot { background-color: #3b82f6; }

.capability-pill.cap-oauth {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.capability-pill.cap-oauth .capability-dot { background-color: #22c55e; }

.capability-pill.cap-apppass {
    background-color: #faf5ff;
    border-color: #e9d5ff;
    color: #6b21a8;
}
.capability-pill.cap-apppass .capability-dot { background-color: #a855f7; }

.capability-pill.cap-imap {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
.capability-pill.cap-imap .capability-dot { background-color: #64748b; }

.capability-pill.cap-pop3 {
    background-color: #fefce8;
    border-color: #fef08a;
    color: #854d0e;
}
.capability-pill.cap-pop3 .capability-dot { background-color: #eab308; }

.capability-pill.cap-mime {
    background-color: #fdf2f8;
    border-color: #fbcfe8;
    color: #9d174d;
}
.capability-pill.cap-mime .capability-dot { background-color: #ec4899; }

.capability-pill.cap-folders {
    background-color: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
}
.capability-pill.cap-folders .capability-dot { background-color: #06b6d4; }

.capability-pill.cap-flags {
    background-color: #fff7ed;
    border-color: #ffedd5;
    color: #9a3412;
}
.capability-pill.cap-flags .capability-dot { background-color: #f97316; }

.capability-pill.cap-revoke {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.capability-pill.cap-revoke .capability-dot { background-color: #ef4444; }

/* Dark mode theme support */
[data-bs-theme="dark"] .capability-pill,
body.dark-mode .capability-pill {
    background-color: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
[data-bs-theme="dark"] .capability-pill.cap-api,
body.dark-mode .capability-pill.cap-api {
    background-color: #172554;
    border-color: #1e40af;
    color: #bfdbfe;
}
[data-bs-theme="dark"] .capability-pill.cap-oauth,
body.dark-mode .capability-pill.cap-oauth {
    background-color: #052e16;
    border-color: #166534;
    color: #bbf7d0;
}
[data-bs-theme="dark"] .capability-pill.cap-apppass,
body.dark-mode .capability-pill.cap-apppass {
    background-color: #3b0764;
    border-color: #6b21a8;
    color: #e9d5ff;
}
[data-bs-theme="dark"] .capability-pill.cap-imap,
body.dark-mode .capability-pill.cap-imap {
    background-color: #0f172a;
    border-color: #475569;
    color: #cbd5e1;
}
[data-bs-theme="dark"] .capability-pill.cap-mime,
body.dark-mode .capability-pill.cap-mime {
    background-color: #500724;
    border-color: #9d174d;
    color: #fbcfe8;
}
[data-bs-theme="dark"] .capability-pill.cap-folders,
body.dark-mode .capability-pill.cap-folders {
    background-color: #083344;
    border-color: #155e75;
    color: #a5f3fc;
}
[data-bs-theme="dark"] .capability-pill.cap-flags,
body.dark-mode .capability-pill.cap-flags {
    background-color: #431407;
    border-color: #9a3412;
    color: #fed7aa;
}

/* ---- Auth Method Badges (Blue bar, White writing) ------------------------ */
.auth-method-badge {
    background-color: #0d6efd !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    padding: 0.28rem 0.65rem !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    border: 1px solid #0b5ed7 !important;
    box-shadow: 0 1px 2px rgba(13, 110, 253, 0.22) !important;
    letter-spacing: 0.2px;
}
.auth-method-badge svg,
.auth-method-badge i {
    color: #ffffff !important;
}

/* ---- Dynamic Live Progress Bars (Batch Mode & Job Source) ---------------- */
.dynamic-progress-box {
    margin-top: 4px;
    min-width: 130px;
    max-width: 200px;
}
.dynamic-progress-track {
    height: 7px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.dynamic-progress-bar {
    height: 100%;
    transition: width 0.4s ease-in-out;
    border-radius: 4px;
}
.dynamic-progress-bar.bar-running {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%) !important;
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}
.dynamic-progress-bar.bar-completed {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%) !important;
}
.dynamic-progress-bar.bar-warning {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%) !important;
}
.dynamic-progress-bar.bar-failed {
    background: linear-gradient(90deg, #ef4444 0%, #b91c1c 100%) !important;
}
.dynamic-progress-bar.bar-queued {
    background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%) !important;
}

[data-bs-theme="dark"] .dynamic-progress-track,
body.dark-mode .dynamic-progress-track {
    background-color: #334155;
}
