/* =========================================================
   Webtonia brand tokens (scoped to plugin pages only)
   ========================================================= */

.wp-ap-page {
    --wp-ap-brand:        #60a231;
    --wp-ap-brand-dark:   #4e8527;
    --wp-ap-brand-darker: #3e6c1f;
    --wp-ap-brand-light:  #eaf4e1;
    --wp-ap-brand-ring:   rgba(96, 162, 49, 0.35);

    --wp-ap-ink:      #1d2327;
    --wp-ap-muted:     #646970;
    --wp-ap-border:    #dcdcde;
    --wp-ap-surface:   #ffffff;
    --wp-ap-surface-2: #f6f8f4;
    --wp-ap-danger:    #d63638;
}

/* =========================================================
   Toggle: native checkbox sits on top of a circle
   (red X = off, green check = on)
   ========================================================= */

.wp-ap-toggle {
    --toggle-size: 22px;
    --toggle-icon: 10px;

    position: relative;
    display: inline-block;
    width: var(--toggle-size);
    height: var(--toggle-size);
    flex-shrink: 0;
    vertical-align: middle;
}

.wp-ap-toggle input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.wp-ap-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--wp-ap-danger);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: background 0.15s ease;
    pointer-events: none;
}

.wp-ap-toggle-thumb {
    display: none;
}

/* Off: white X */
.wp-ap-toggle-track::before,
.wp-ap-toggle-track::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--toggle-icon);
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.15s ease, width 0.15s ease, height 0.15s ease, top 0.15s ease, left 0.15s ease, background 0.15s ease;
}

.wp-ap-toggle-track::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.wp-ap-toggle-track::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* On: green circle + white check */
.wp-ap-toggle input:checked ~ .wp-ap-toggle-track {
    background: var(--wp-ap-brand);
}

.wp-ap-toggle input:checked ~ .wp-ap-toggle-track::before {
    top: 54%;
    left: 36%;
    width: 5px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(45deg);
}

.wp-ap-toggle input:checked ~ .wp-ap-toggle-track::after {
    top: 50%;
    left: 58%;
    width: 9px;
    height: 2px;
    transform: translate(-50%, -50%) rotate(-50deg);
}

.wp-ap-toggle input:focus-visible ~ .wp-ap-toggle-track {
    outline: 2px solid var(--wp-ap-brand);
    outline-offset: 2px;
}

.wp-ap-toggle-lg {
    --toggle-size: 32px;
    --toggle-icon: 14px;
}

.wp-ap-toggle-lg input:checked ~ .wp-ap-toggle-track::before {
    top: 55%;
    left: 36%;
    width: 7px;
}

.wp-ap-toggle-lg input:checked ~ .wp-ap-toggle-track::after {
    top: 50%;
    left: 58%;
    width: 13px;
}

.wp-ap-option-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 12px;
}

.wp-ap-option-toggle {
    max-width: 100%;
}

/* =========================================================
   Native checkboxes/radios on plugin pages — brand color
   ========================================================= */

.wp-ap-page input[type="checkbox"],
.wp-ap-page input[type="radio"] {
    accent-color: var(--wp-ap-brand);
}

.wp-ap-page fieldset label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* =========================================================
   Global status banner
   ========================================================= */

.wp-ap-global-toggle-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--wp-ap-surface-2);
    border: 1px solid var(--wp-ap-border);
    border-radius: 6px;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}

.wp-ap-global-toggle-text {
    flex: 1;
}

.wp-ap-global-toggle-text strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.2rem;
}

/* =========================================================
   Feature groups & card grid
   ========================================================= */

.wp-ap-feature-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 1600px;
}

.wp-ap-feature-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid var(--wp-ap-brand);
}

.wp-ap-feature-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wp-ap-ink);
    margin: 0;
}

.wp-ap-group-actions {
    display: flex;
    gap: 0.375rem;
}

.wp-ap-group-toggle {
    font-size: 0.75rem;
    color: var(--wp-ap-brand-dark);
    background: none;
    border: none;
    padding: 0.1rem 0.25rem;
    cursor: pointer;
    text-decoration: underline;
    line-height: 1;
}

.wp-ap-group-toggle:hover { color: var(--wp-ap-brand-darker); }

.wp-ap-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.wp-ap-feature-card {
    padding: 0.7rem 0.875rem;
    background: var(--wp-ap-surface);
    border: 1px solid var(--wp-ap-border);
    border-radius: 6px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    margin: 0;
    line-height: 1;
}

.wp-ap-feature-card:hover               { border-color: var(--wp-ap-brand); }
.wp-ap-feature-card:has(input:checked),
.wp-ap-feature-card.is-active           {
    border-color: var(--wp-ap-brand);
    background: var(--wp-ap-brand-light);
    box-shadow: 0 0 0 1px var(--wp-ap-brand) inset;
}

/*
 * The toggle + name/desc live in their own <label>, separate from the
 * "manage / configure" links below — a <label> must never wrap an <a>,
 * or click handling between the two becomes unreliable (the very bug
 * this fixed: the two_factor_auth card's "Eigene 2FA einrichten →" link
 * used to sit inside the same <label> as the checkbox).
 */
.wp-ap-feature-card-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    margin: 0;
}

.wp-ap-feature-card-text  { flex: 1; min-width: 0; }

.wp-ap-feature-card-name {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--wp-ap-ink);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.wp-ap-feature-card-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--wp-ap-muted);
    line-height: 1.4;
}

.wp-ap-feature-card-link {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.35rem;
    margin-left: calc(36px + 0.625rem);
    color: var(--wp-ap-brand-dark);
}

/* =========================================================
   Blacklist pill checkboxes (default list)
   ========================================================= */

.wp-ap-blacklist-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.75rem 0 0.5rem;
}

.wp-ap-blacklist-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem 0.3rem 0.75rem;
    border: 1px solid var(--wp-ap-border);
    border-radius: 999px;
    background: var(--wp-ap-surface-2);
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.4;
    transition: all 0.15s ease;
    margin: 0;
    color: var(--wp-ap-ink);
}

.wp-ap-blacklist-item input[type="checkbox"] { display: none; }

.wp-ap-blacklist-item-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.wp-ap-blacklist-name {
    font-weight: 600;
}

.wp-ap-blacklist-slug {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.75rem;
    opacity: 0.65;
}

.wp-ap-blacklist-slug--only {
    font-family: inherit;
    font-style: italic;
    opacity: 0.55;
}

.wp-ap-blacklist-version {
    font-family: Consolas, Monaco, monospace;
    font-size: 0.6875rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    opacity: 0.8;
}

.wp-ap-blacklist-item-remove {
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    cursor: pointer;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    text-align: center;
    font-family: Arial, sans-serif;
    transition: background 0.15s ease, color 0.15s ease;
}

.wp-ap-blacklist-item.is-checked .wp-ap-blacklist-item-remove,
.wp-ap-blacklist-item:has(input:checked) .wp-ap-blacklist-item-remove {
    display: inline-flex;
}

.wp-ap-blacklist-item-remove:hover {
    background: var(--wp-ap-danger);
    color: #fff;
}

.wp-ap-blacklist-item:hover                   { border-color: var(--wp-ap-brand); background: var(--wp-ap-brand-light); }
.wp-ap-blacklist-item:has(input:checked),
.wp-ap-blacklist-item.is-checked              { border-color: var(--wp-ap-danger); background: #fef7f7; color: var(--wp-ap-danger); }

/* =========================================================
   Tag input (custom blacklist)
   ========================================================= */

.wp-ap-tag-input-wrapper {
    border: 1px solid var(--wp-ap-border);
    border-radius: 6px;
    background: var(--wp-ap-surface);
    padding: 0.625rem;
    max-width: 600px;
}

.wp-ap-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    min-height: 1.875rem;
    margin-top: 0.625rem;
}

.wp-ap-tag-list:empty::before {
    content: "No custom entries yet.";
    font-size: 0.8125rem;
    color: #a7aaad;
    line-height: 1.875rem;
}

.wp-ap-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.3rem 0.25rem 0.625rem;
    background: var(--wp-ap-danger);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-family: Consolas, Monaco, monospace;
    color: #fff;
}

.wp-ap-tag--resolved {
    padding-left: 0.75rem;
}

.wp-ap-tag-name {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
}

.wp-ap-tag-version {
    font-size: 0.6875rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.wp-ap-tag-slug {
    font-size: 0.75rem;
    opacity: 0.8;
}

.wp-ap-tag-slug--only {
    opacity: 1;
}

.wp-ap-tag-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.1rem;
    display: inline-flex;
    align-items: center;
}

.wp-ap-tag-remove:hover { color: #fff; }

.wp-ap-tag-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.wp-ap-tag-input-row input[type="text"] {
    flex: 1;
    max-width: 300px;
    margin-top: 0;
    font-family: Consolas, Monaco, monospace;
}

.wp-ap-submit-container {
    border-top: 1px solid var(--wp-ap-border);
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1.125rem 0;
    display: flex;
    gap: 0.625rem;
    align-items: center;
}

.wp-ap-btn-reset,
.wp-ap-btn-export {
    margin-left: 0.25rem;
}

.wp-ap-cards-top {
    margin-top: 1.25rem;
}

.wp-ap-card {
    flex: 1 1 380px;
    max-width: 640px;
    margin-bottom: 1.25rem;
}

.wp-ap-inline-form {
    display: inline;
}

.wp-ap-logs-table td .wp-ap-inline-form + .wp-ap-inline-form {
    margin-left: 6px;
}

.wp-ap-approval-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.wp-ap-approval-status--pending {
    background: #fef3cd;
    color: #8a6100;
}

.wp-ap-approval-status--approved {
    background: var(--wp-ap-brand-light, #eaf4e1);
    color: var(--wp-ap-brand-dark, #4e8527);
}

.wp-ap-approval-status--denied {
    background: #fbe3e3;
    color: var(--wp-ap-danger, #d63638);
}

/* =========================================================
   User picker — searchable multi-select of toggleable user cards.
   Works with zero JS as a plain scrollable checkbox list; JS
   (wp-admin-protector-user-picker.js) adds the .is-enhanced class,
   which is what actually collapses it into a dropdown + chips.
   ========================================================= */

.wp-ap-user-picker {
    position: relative;
    max-width: 560px;
}

.wp-ap-user-picker-chips {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.wp-ap-user-picker.is-enhanced .wp-ap-user-picker-chips:not(:empty) {
    display: flex;
}

.wp-ap-user-picker-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    background: var(--wp-ap-brand-light, #eaf4e1);
    color: var(--wp-ap-brand-dark, #4e8527);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.wp-ap-user-picker-chip button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(78, 133, 39, 0.18);
    color: inherit;
    cursor: pointer;
    line-height: 1;
    font-size: 12px;
}

.wp-ap-user-picker-chip button:hover {
    background: rgba(78, 133, 39, 0.32);
}

.wp-ap-user-picker-search {
    display: none;
    width: 100%;
    box-sizing: border-box;
}

.wp-ap-user-picker.is-enhanced .wp-ap-user-picker-search {
    display: block;
}

.wp-ap-user-picker-dropdown {
    display: flex;
    flex-direction: column;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--wp-ap-border, #dcdcde);
    border-radius: 10px;
}

.wp-ap-user-picker.is-enhanced .wp-ap-user-picker-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    display: none;
    background: var(--wp-ap-surface, #fff);
    box-shadow: 0 10px 28px rgba(29, 35, 39, 0.14);
}

.wp-ap-user-picker.is-enhanced.is-open .wp-ap-user-picker-dropdown {
    display: flex;
}

.wp-ap-user-picker-empty {
    margin: 0;
    padding: 14px;
    color: var(--wp-ap-muted, #646970);
    font-size: 13px;
}

.wp-ap-user-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.wp-ap-user-picker-row + .wp-ap-user-picker-row {
    border-top: 1px solid var(--wp-ap-border, #dcdcde);
}

.wp-ap-user-picker-row:hover {
    background: var(--wp-ap-surface-2, #f6f8f4);
}

.wp-ap-user-picker-row.is-hidden {
    display: none;
}

.wp-ap-user-picker-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--wp-ap-brand-light, #eaf4e1);
    color: var(--wp-ap-brand-dark, #4e8527);
    font-size: 12px;
    font-weight: 700;
}

.wp-ap-user-picker-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.wp-ap-user-picker-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wp-ap-ink, #1d2327);
}

.wp-ap-user-picker-meta {
    font-size: 12px;
    color: var(--wp-ap-muted, #646970);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-ap-user-picker-row .wp-ap-toggle {
    margin-left: auto;
}

.wp-ap-log-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.wp-ap-logs-table pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* =========================================================
   Buttons — Webtonia brand styling (scoped to plugin pages)
   ========================================================= */

.wp-ap-page .button-primary {
    background: var(--wp-ap-brand);
    border-color: var(--wp-ap-brand-dark);
    color: #fff;
    box-shadow: none;
    text-shadow: none;
    border-radius: 6px;
    font-weight: 600;
    padding: 0 1rem;
    height: 34px;
    line-height: 32px;
    transition: background 0.15s ease, transform 0.05s ease;
}

.wp-ap-page .button-primary:hover,
.wp-ap-page .button-primary:focus {
    background: var(--wp-ap-brand-dark);
    border-color: var(--wp-ap-brand-darker);
    color: #fff;
}

.wp-ap-page .button-primary:active {
    background: var(--wp-ap-brand-darker);
    transform: translateY(1px);
}

.wp-ap-page .button-primary:focus-visible {
    outline: 2px solid var(--wp-ap-brand);
    outline-offset: 2px;
    box-shadow: none;
}

.wp-ap-page .button-secondary,
.wp-ap-page .button.button:not(.button-primary) {
    border-radius: 6px;
    border-color: var(--wp-ap-border);
    color: var(--wp-ap-ink);
    height: 34px;
    line-height: 32px;
}

.wp-ap-page .button-secondary:hover,
.wp-ap-page .button.button:not(.button-primary):hover {
    border-color: var(--wp-ap-brand);
    color: var(--wp-ap-brand-dark);
}

/* =========================================================
   Inputs, selects & textareas — scoped to plugin pages
   ========================================================= */

.wp-ap-page input[type="text"],
.wp-ap-page input[type="number"],
.wp-ap-page input[type="url"],
.wp-ap-page input[type="password"],
.wp-ap-page input[type="email"],
.wp-ap-page select,
.wp-ap-page textarea {
    border-radius: 6px;
    border: 1px solid var(--wp-ap-border);
    box-shadow: none;
    padding: 0.4rem 0.65rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wp-ap-page input[type="text"]:focus,
.wp-ap-page input[type="number"]:focus,
.wp-ap-page input[type="url"]:focus,
.wp-ap-page input[type="password"]:focus,
.wp-ap-page input[type="email"]:focus,
.wp-ap-page select:focus,
.wp-ap-page textarea:focus {
    border-color: var(--wp-ap-brand);
    box-shadow: 0 0 0 3px var(--wp-ap-brand-ring);
    outline: none;
}

.wp-ap-page textarea {
    margin-top: 1rem;
    max-width: 50rem;
}

/* ---- shared card styles ---- */

.wp-ap-page .card-wrapper {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.wp-ap-page .card {
    background: var(--wp-ap-surface);
    border-radius: 8px;
    border: 1px solid var(--wp-ap-border);
    margin-right: 2rem;
    padding: 1.25rem;
}

.wp-ap-page .card h2 {
    border-bottom: 1px solid var(--wp-ap-border);
    margin-top: 0;
    padding-bottom: 0.625rem;
}

.wp-ap-page .card ul {
    list-style-type: disc;
    margin-bottom: 0;
    margin-left: 1.25rem;
}

.wp-ap-page .card code {
    background: var(--wp-ap-surface-2);
    border-radius: 4px;
    padding: 0.125rem 0.375rem;
}

/* =========================================================
   Blacklist page extras
   ========================================================= */

.wp-ap-blacklist-summary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: var(--wp-ap-surface-2);
    border: 1px solid var(--wp-ap-border);
    border-radius: 6px;
    margin-bottom: 1.25rem;
    max-width: 1600px;
    font-size: 0.875rem;
}

.wp-ap-blacklist-card {
    max-width: 1600px;
    margin-bottom: 1.25rem;
}

.wp-ap-blacklist-hint {
    margin-top: 0.625rem;
}

.wp-ap-badge {
    display: inline-block;
    background: var(--wp-ap-brand);
    color: #fff;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    vertical-align: middle;
    margin-left: 0.375rem;
    line-height: 1.5;
}

/* ---- form table ---- */

.wp-ap-page .form-table td p.description {
    color: var(--wp-ap-muted);
    margin-top: 0.25rem;
}

/* ---- audit cards — side by side ---- */

.wp-ap-audit-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1600px;
    margin-bottom: 1.25rem;
}

.wp-ap-audit-cards .wp-ap-audit-card {
    flex: 1 1 320px;
    margin-bottom: 0;
    max-width: none;
}

.wp-ap-audit-card {
    max-width: 1600px;
    margin-bottom: 1.25rem;
}

.wp-ap-admin-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.wp-ap-admin-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f1;
}

.wp-ap-admin-list li:last-child {
    border-bottom: none;
}

/* ---- admin bar icon ---- */

.wp-admin-protector-bar-wrapper {
    display: flex;
}

.wp-admin-protector-bar-icon {
    margin-top: 0.25rem !important;
    margin-right: 0.25rem !important;
}

.wp-admin-protector-bar-icon.status--enabled svg {
    stroke: #60a231;
}

.wp-admin-protector-bar-icon.status--disabled svg {
    stroke: #d63638;
}

.wp-admin-protector-bar-icon.status--partial svg {
    stroke: #dba617;
}

/* =========================================================
   2FA setup page
   ========================================================= */

.wp-ap-2fa-qr {
    margin: 12px 0;
    max-width: 240px;
}

.wp-ap-2fa-qr svg {
    width: 100%;
    height: auto;
    border: 1px solid var(--wp-ap-border);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.wp-ap-backup-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 6px 16px;
    list-style: none;
    margin: 12px 0;
    max-width: 320px;
    padding: 12px;
    background: var(--wp-ap-surface-2);
    border: 1px solid var(--wp-ap-border);
    border-radius: 6px;
}

.wp-ap-backup-codes li {
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
}

.wp-ap-error {
    color: var(--wp-ap-danger);
    font-weight: 600;
}

/* =========================================================
   Login screen 2FA prompt — brand accent
   ========================================================= */

body.login #wp_ap_2fa_form #wp_ap_2fa_code:focus {
    border-color: #60a231;
    box-shadow: 0 0 0 1px #60a231;
}

body.login #wp_ap_2fa_form .button-primary {
    background: #60a231;
    border-color: #4e8527;
    box-shadow: none;
    text-shadow: none;
}

body.login #wp_ap_2fa_form .button-primary:hover,
body.login #wp_ap_2fa_form .button-primary:focus {
    background: #4e8527;
    border-color: #3e6c1f;
}

/* =========================================================
   Role enforcement chips (2FA settings)
   ========================================================= */

.wp-ap-role-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0 0.5rem;
}

.wp-ap-role-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem 0.35rem 0.4rem;
    border: 1px solid var(--wp-ap-border);
    border-radius: 999px;
    background: var(--wp-ap-surface);
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.3;
    transition: border-color 0.15s ease, background 0.15s ease;
    margin: 0 !important;
}

.wp-ap-role-chip--all {
    font-weight: 600;
    border-color: var(--wp-ap-brand);
}

.wp-ap-role-chip:hover               { border-color: var(--wp-ap-brand); }
.wp-ap-role-chip.is-checked          { border-color: var(--wp-ap-brand); background: var(--wp-ap-brand-light); }
.wp-ap-role-chip--all.is-checked     { background: var(--wp-ap-brand-light); }

.wp-ap-role-chip-label { color: var(--wp-ap-ink); font-weight: 500; }
.wp-ap-role-chip--all .wp-ap-role-chip-label { font-weight: 700; }

/* =========================================================
   Responsive layout — tablet & mobile
   ========================================================= */

@media (max-width: 960px) {
    .wp-ap-feature-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .wp-ap-audit-cards,
    .wp-ap-page .card-wrapper {
        gap: 0.75rem;
    }
}

@media (max-width: 782px) {
    .wp-ap-page .wrap { overflow-x: hidden; }

    .wp-ap-global-toggle-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }

    .wp-ap-feature-grid {
        grid-template-columns: 1fr;
    }

    .wp-ap-feature-group-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .wp-ap-audit-cards,
    .wp-ap-page .card-wrapper {
        flex-direction: column;
    }

    .wp-ap-card,
    .wp-ap-audit-cards .wp-ap-audit-card {
        flex: 1 1 auto;
        max-width: 100%;
        margin-right: 0;
    }

    .wp-ap-page textarea,
    .wp-ap-page input[type="text"],
    .wp-ap-page input[type="url"] {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .wp-ap-tag-input-wrapper {
        max-width: 100%;
        box-sizing: border-box;
    }

    .wp-ap-tag-input-row {
        flex-wrap: wrap;
    }

    .wp-ap-tag-input-row input[type="text"] {
        max-width: 100%;
    }

    .wp-ap-submit-container {
        flex-wrap: wrap;
    }

    .wp-ap-backup-codes {
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .wp-ap-backup-codes {
        grid-template-columns: 1fr;
    }

    .wp-ap-role-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .wp-ap-role-chip {
        justify-content: flex-start;
    }
}

/* =========================================================
   Preset / custom number picker (rate-limit thresholds)
   ========================================================= */

.wp-ap-preset-fieldset {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    max-width: 1100px;
}

.wp-ap-preset-field {
    background: var(--wp-ap-surface);
    border: 1px solid var(--wp-ap-border);
    border-radius: 10px;
    padding: 1rem 1.1rem;
}

.wp-ap-preset-field label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--wp-ap-ink);
    margin-bottom: 0.55rem;
}

.wp-ap-preset-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.wp-ap-preset-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--wp-ap-border);
    border-radius: 999px;
    background: var(--wp-ap-surface);
    color: var(--wp-ap-ink);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.wp-ap-preset-btn:hover {
    border-color: var(--wp-ap-brand);
    color: var(--wp-ap-brand-dark);
}

.wp-ap-preset-btn.is-active {
    background: var(--wp-ap-brand);
    border-color: var(--wp-ap-brand-dark);
    color: #fff;
}

.wp-ap-preset-custom-input {
    display: inline-block;
    width: 70px;
    margin-left: 0.25rem;
}

.wp-ap-preset-field .description {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

@media (max-width: 782px) {
    .wp-ap-preset-fieldset {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Allowed Admin IPs — validated input + grouped-by-owner list
   ========================================================= */

.wp-ap-ip-input-wrapper {
    max-width: 720px;
}

.wp-ap-ip-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.wp-ap-ip-field {
    flex: 1 1 260px;
    min-width: 200px;
}

.wp-ap-ip-owner-field {
    flex: 1 1 200px;
    min-width: 160px;
}

.wp-ap-ip-input-wrapper .wp-ap-error {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
}

.wp-ap-ip-groups {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wp-ap-ip-empty {
    margin: 0;
    color: var(--wp-ap-muted);
    font-size: 0.8125rem;
}

.wp-ap-ip-group {
    padding: 0.625rem 0.75rem;
    background: var(--wp-ap-surface-2);
    border: 1px solid var(--wp-ap-border);
    border-radius: 6px;
}

.wp-ap-ip-group-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wp-ap-brand-dark);
    margin-bottom: 0.4rem;
}

.wp-ap-ip-group .wp-ap-tag {
    background: var(--wp-ap-surface);
    color: var(--wp-ap-ink);
    border: 1px solid var(--wp-ap-border);
    font-family: Consolas, Monaco, monospace;
}

.wp-ap-ip-group .wp-ap-tag-remove {
    color: var(--wp-ap-muted);
}

.wp-ap-ip-group .wp-ap-tag-remove:hover {
    color: var(--wp-ap-danger);
}

/* =========================================================
   Unsaved-changes bar
   ========================================================= */

.wp-ap-unsaved-bar[hidden] {
    display: none;
}

.wp-ap-unsaved-bar {
    position: sticky;
    top: 32px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    margin: 0.75rem 0 1rem;
    background: #fff8e5;
    border: 1px solid #f0c33c;
    border-left: 4px solid #dba617;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.wp-ap-unsaved-bar-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6a5100;
}

.wp-ap-key-generator {
    margin-top: 12px;
}

.wp-ap-key-generator-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
}

.wp-ap-key-generator-row .regular-text {
    flex: 1 1 380px;
    min-width: 200px;
}

.wp-ap-key-generator-note {
    margin: 4px 0 0;
    font-size: 12px;
    color: #00a32a;
}

/* =========================================================
   2FA wizard — shared between wp-admin self-service setup
   and the isolated login-time enrollment pages
   ========================================================= */

.wp-ap-wizard-wrap {
    display: flex;
    justify-content: center;
    padding: 24px 16px 40px;
}

body.wp-ap-2fa-page #login {
    width: auto;
    max-width: 490px;
    padding-top: 0;
}

body.wp-ap-2fa-page #login h1 {
    margin-bottom: 10px;
}

.wp-ap-wizard-card {
    width: 100%;
    max-width: 460px;
    background: var(--wp-ap-surface, #fff);
    border: 1px solid var(--wp-ap-border, #dcdcde);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(29, 35, 39, 0.07), 0 30px 70px rgba(29, 35, 39, 0.16);
    padding: 32px 30px 30px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(28px) scale(.985);
    animation: wtLoginIn .65s cubic-bezier(.16, 1, .3, 1) .05s forwards;
}

@keyframes wtLoginIn {
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-ap-wizard-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.wp-ap-wizard-header {
    text-align: center;
    margin-bottom: 26px;
}

.wp-ap-wizard-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--wp-ap-brand-light, #eaf4e1);
    color: var(--wp-ap-brand-dark, #4e8527);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.wp-ap-wizard-icon svg {
    width: 26px;
    height: 26px;
}

.wp-ap-wizard-icon.is-denied {
    background: #fbe3e3;
    color: var(--wp-ap-danger, #d63638);
}

.wp-ap-wizard-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 700;
    color: var(--wp-ap-ink, #1d2327);
}

.wp-ap-wizard-header p {
    margin: 0;
    font-size: 13px;
    color: var(--wp-ap-muted, #646970);
}

/* ── Step indicator ─────────────────────────────────────── */

.wp-ap-wizard-steps {
    display: flex;
    align-items: flex-start;
    margin: 0 0 28px;
}

.wp-ap-wizard-step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.wp-ap-wizard-step-line {
    position: absolute;
    top: 15px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--wp-ap-border, #dcdcde);
    z-index: 0;
    transition: background 0.2s ease;
}

.wp-ap-wizard-step:last-child .wp-ap-wizard-step-line {
    display: none;
}

.wp-ap-wizard-step-circle {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wp-ap-surface, #fff);
    border: 2px solid var(--wp-ap-border, #dcdcde);
    color: var(--wp-ap-muted, #646970);
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.wp-ap-wizard-step-circle svg {
    width: 15px;
    height: 15px;
}

.wp-ap-wizard-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--wp-ap-muted, #646970);
    line-height: 1.3;
}

.wp-ap-wizard-step.is-active .wp-ap-wizard-step-circle {
    border-color: var(--wp-ap-brand, #60a231);
    background: var(--wp-ap-brand, #60a231);
    color: #fff;
    box-shadow: 0 0 0 4px var(--wp-ap-brand-ring, rgba(96, 162, 49, 0.35));
}

.wp-ap-wizard-step.is-active .wp-ap-wizard-step-label {
    color: var(--wp-ap-brand-dark, #4e8527);
}

.wp-ap-wizard-step.is-done .wp-ap-wizard-step-circle {
    border-color: var(--wp-ap-brand, #60a231);
    background: var(--wp-ap-brand, #60a231);
    color: #fff;
}

.wp-ap-wizard-step.is-done .wp-ap-wizard-step-line {
    background: var(--wp-ap-brand, #60a231);
}

.wp-ap-wizard-step.is-done .wp-ap-wizard-step-label {
    color: var(--wp-ap-ink, #1d2327);
}

/* ── Step panels ─────────────────────────────────────────── */

.wp-ap-wizard-panel h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--wp-ap-ink, #1d2327);
}

.wp-ap-wizard-panel p.description {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--wp-ap-muted, #646970);
}

.wp-ap-wizard-qr-wrap {
    display: flex;
    justify-content: center;
    padding: 18px;
    margin: 4px 0 16px;
    background: var(--wp-ap-surface-2, #f6f8f4);
    border-radius: 14px;
}

.wp-ap-wizard-qr-wrap svg {
    width: 176px;
    height: 176px;
    max-width: 100%;
}

.wp-ap-wizard-secret {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0.03em;
    background: var(--wp-ap-surface-2, #f6f8f4);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 0 0 22px;
    word-break: break-all;
    text-align: center;
}

/* ── OTP digit boxes ─────────────────────────────────────── */

.wp-ap-otp {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 4px 0 22px;
}

/*
 * High-specificity + !important: the site's own login-page branding
 * stylesheet (webtonia-info/assets/css/login.css) targets bare
 * ".login input[type='text']" with a floating-label style (transparent,
 * bottom-border-only, shifted up 35px, 20px font) that otherwise wins
 * against a plain ".wp-ap-otp input" rule of equal/lower specificity.
 * These OTP boxes must render as real boxes regardless of what any other
 * plugin/theme does to generic text inputs on the login page.
 */
.wp-ap-otp input[type="text"],
body.wp-ap-2fa-page .wp-ap-otp input[type="text"] {
    box-sizing: border-box !important;
    position: static !important;
    top: auto !important;
    width: 42px;
    height: 52px;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 1.5px solid var(--wp-ap-border, #dcdcde) !important;
    border-radius: 10px !important;
    color: var(--wp-ap-ink, #1d2327);
    background: var(--wp-ap-surface, #fff) !important;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wp-ap-otp input[type="text"]:focus,
body.wp-ap-2fa-page .wp-ap-otp input[type="text"]:focus {
    outline: none;
    border-color: var(--wp-ap-brand, #60a231) !important;
    box-shadow: 0 0 0 3px var(--wp-ap-brand-ring, rgba(96, 162, 49, 0.35)) !important;
}

/* ── Big pill buttons ────────────────────────────────────── */

.wp-ap-wizard-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--wp-ap-brand, #60a231);
    color: #fff;
    border: none;
    border-radius: 999px;
    height: 46px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(96, 162, 49, 0.28);
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.wp-ap-wizard-btn:hover,
.wp-ap-wizard-btn:focus-visible {
    background: var(--wp-ap-brand-dark, #4e8527);
}

.wp-ap-wizard-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(96, 162, 49, 0.28);
}

.wp-ap-wizard-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.wp-ap-wizard-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.wp-ap-wizard-btn-ghost {
    width: 100%;
    margin-top: 10px;
    background: transparent;
    border: 1.5px solid var(--wp-ap-border, #dcdcde);
    color: var(--wp-ap-ink, #1d2327);
    border-radius: 999px;
    height: 42px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.wp-ap-wizard-btn-ghost:hover {
    border-color: var(--wp-ap-brand, #60a231);
    color: var(--wp-ap-brand-dark, #4e8527);
}

.wp-ap-wizard-error {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fcf0f1;
    border: 1px solid #f3c6c7;
    color: #8a2424;
    font-size: 13px;
    text-align: center;
}

.wp-ap-wizard-error:empty {
    display: none;
}

/* ── Backup codes ────────────────────────────────────────── */

.wp-ap-wizard-backup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 0 22px;
}

.wp-ap-wizard-backup-grid code {
    display: block;
    text-align: center;
    padding: 11px 8px;
    background: var(--wp-ap-surface-2, #f6f8f4);
    border: 1px solid var(--wp-ap-border, #dcdcde);
    border-radius: 9px;
    font-size: 14px;
    letter-spacing: 0.02em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.wp-ap-wizard-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: var(--wp-ap-surface-2, #f6f8f4);
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 22px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--wp-ap-muted, #646970);
}

/* ── Grace-period countdown ──────────────────────────────── */

.wp-ap-wizard-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 10px auto 0;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--wp-ap-brand-light, #eaf4e1);
    color: var(--wp-ap-brand-dark, #4e8527);
    font-size: 12px;
    font-weight: 600;
}

.wp-ap-wizard-countdown svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.wp-ap-wizard-countdown-value {
    font-variant-numeric: tabular-nums;
}

.wp-ap-wizard-countdown.is-expiring {
    background: #fdf0d5;
    color: #8a5a00;
}

.wp-ap-wizard-countdown.is-expired {
    background: #fcf0f1;
    color: #8a2424;
}

.wp-ap-notice-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--wp-ap-brand-light, #eaf4e1);
    color: var(--wp-ap-brand-dark, #4e8527);
    font-weight: 700;
    font-size: 12px;
}

.wp-ap-notice-countdown.is-expiring {
    background: #fdf0d5;
    color: #8a5a00;
}

/* ── "Already enabled" management cards (wp-admin) ──────── */

.wp-ap-wizard-status-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--wp-ap-brand-light, #eaf4e1);
    margin-bottom: 20px;
}

.wp-ap-wizard-status-card .wp-ap-wizard-icon {
    width: 44px;
    height: 44px;
    margin: 0;
    flex-shrink: 0;
    background: var(--wp-ap-brand, #60a231);
    color: #fff;
}

.wp-ap-wizard-status-card .wp-ap-wizard-icon svg {
    width: 20px;
    height: 20px;
}

.wp-ap-wizard-status-card strong {
    display: block;
    font-size: 14px;
    color: var(--wp-ap-ink, #1d2327);
}

.wp-ap-wizard-status-card span {
    font-size: 12px;
    color: var(--wp-ap-muted, #646970);
}

@media (max-width: 480px) {
    .wp-ap-wizard-card {
        padding: 24px 18px 22px;
        border-radius: 14px;
    }

    .wp-ap-otp input[type="text"] {
        width: 36px !important;
        height: 46px !important;
        font-size: 18px;
    }

    .wp-ap-wizard-backup-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .wp-ap-unsaved-bar {
        top: 0;
        position: static;
    }

    .wp-ap-ip-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wp-ap-ip-field,
    .wp-ap-ip-owner-field {
        min-width: 0;
    }
}

/* Content-/Schadcode-Funde: Massenaktionen und Zeilen-Aktionen */
.wp-ap-button-danger {
    color: #d63638;
    border-color: #d63638 !important;
}

.wp-ap-button-danger:hover {
    background: #d63638;
    color: #fff;
}

.wp-ap-bulk-count {
    margin-left: 8px;
    font-style: italic;
}

.wp-ap-history {
    margin-top: 16px;
}

.wp-ap-history summary {
    cursor: pointer;
    font-weight: 600;
}

/* =========================================================
   Malware-Scanner-Seite: Aktions-Karten, gefüllte Buttons,
   Icons, Tooltip-Infos, dezente Animationen
   ========================================================= */

@keyframes wp-ap-card-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes wp-ap-spin {
    to { transform: rotate(360deg); }
}

.wp-ap-malware-page .wp-ap-lede {
    max-width: 62rem;
    color: var(--wp-ap-muted);
    font-size: 14px;
}

.wp-ap-malware-page h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wp-ap-malware-page h1 .dashicons {
    color: var(--wp-ap-brand);
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.wp-ap-malware-page h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2.5rem;
}

.wp-ap-malware-page h2 .dashicons {
    color: var(--wp-ap-muted);
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ---- Info-Tooltip: ersetzt lange Fließtexte unter jedem Button ---- */

.wp-ap-info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--wp-ap-surface-2);
    color: var(--wp-ap-muted);
    cursor: help;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.wp-ap-info-tip .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.wp-ap-info-tip:hover {
    background: var(--wp-ap-brand-light);
    color: var(--wp-ap-brand-dark);
}

/* ---- Aktions-Karten-Grid ---- */

.wp-ap-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin: 1rem 0 1.5rem;
}

.wp-ap-action-card {
    background: var(--wp-ap-surface);
    border: 1px solid var(--wp-ap-border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: wp-ap-card-in 0.25s ease both;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.wp-ap-action-card:hover {
    box-shadow: 0 6px 18px rgba(29, 35, 39, 0.08);
    border-color: var(--wp-ap-border);
    transform: translateY(-1px);
}

.wp-ap-action-card--wide {
    grid-column: 1 / -1;
}

.wp-ap-action-card__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wp-ap-action-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--wp-ap-brand-light);
    color: var(--wp-ap-brand-dark);
    flex-shrink: 0;
}

.wp-ap-action-card--danger .wp-ap-action-card__icon {
    background: #fbe9e9;
    color: var(--wp-ap-danger);
}

.wp-ap-action-card__icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.wp-ap-action-card__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--wp-ap-ink);
    line-height: 1.3;
}

.wp-ap-action-card__meta {
    margin: 0;
    font-size: 12.5px;
    color: var(--wp-ap-muted);
}

.wp-ap-action-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Gefüllte Buttons mit Icon (scoped auf diese Seite) ---- */

.wp-ap-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    border-radius: 6px !important;
    font-weight: 600;
    height: 34px;
    line-height: 32px;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.wp-ap-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wp-ap-btn:active {
    transform: translateY(1px);
}

.wp-ap-btn--brand.button {
    background: var(--wp-ap-brand-light) !important;
    border-color: var(--wp-ap-brand) !important;
    color: var(--wp-ap-brand-darker) !important;
    text-shadow: none;
}

.wp-ap-btn--brand.button:hover {
    background: var(--wp-ap-brand) !important;
    border-color: var(--wp-ap-brand-dark) !important;
    color: #fff !important;
}

.wp-ap-btn--neutral.button {
    background: var(--wp-ap-surface-2) !important;
    border-color: var(--wp-ap-border) !important;
    color: var(--wp-ap-ink) !important;
    text-shadow: none;
}

.wp-ap-btn--neutral.button:hover {
    background: #eceef0 !important;
    border-color: #c3c4c7 !important;
}

.wp-ap-btn--danger.button {
    background: #fbe9e9 !important;
    border-color: #f2b8b8 !important;
    color: var(--wp-ap-danger) !important;
    text-shadow: none;
}

.wp-ap-btn--danger.button:hover {
    background: var(--wp-ap-danger) !important;
    border-color: #b32d2f !important;
    color: #fff !important;
}

.wp-ap-btn--sm.button {
    height: 28px;
    line-height: 26px;
    padding: 0 0.6rem;
    font-size: 12.5px;
}

.wp-ap-btn--sm .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Status-Zeile unter den Aktionen (z. B. "letzter Scan ...") */
.wp-ap-status-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--wp-ap-muted);
    margin: 0.35rem 0 0;
}

.wp-ap-status-line .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--wp-ap-brand);
}

/* ---- Schweregrad-Badges (statt reiner Textfarbe) ---- */

.wp-ap-severity {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.wp-ap-severity .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

.wp-ap-severity--critical {
    background: #fbe9e9;
    color: var(--wp-ap-danger);
}

.wp-ap-severity--warning {
    background: #fdf3e0;
    color: #996800;
}

/* ---- Status-Badges ---- */

.wp-ap-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--wp-ap-surface-2);
    color: var(--wp-ap-muted);
}

.wp-ap-status-badge--pending {
    background: #fdf3e0;
    color: #996800;
}

.wp-ap-status-badge--quarantined,
.wp-ap-status-badge--trashed,
.wp-ap-status-badge--stripped {
    background: var(--wp-ap-brand-light);
    color: var(--wp-ap-brand-dark);
}

/* ---- Leere Zustände ---- */

.wp-ap-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wp-ap-muted);
    padding: 4px 0;
}

.wp-ap-empty .dashicons {
    color: var(--wp-ap-brand);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ---- "Läuft gerade" Spinner für Submit-Buttons ---- */

.wp-ap-btn.wp-ap-is-loading .dashicons {
    animation: wp-ap-spin 0.8s linear infinite;
}

.wp-ap-malware-page .wp-list-table td .wp-ap-inline-form {
    display: inline-block;
    margin: 2px 6px 2px 0;
    vertical-align: middle;
}

@media (max-width: 782px) {
    .wp-ap-actions-grid {
        grid-template-columns: 1fr;
    }
}
