/*
 **********************************************************************
 * -------------------------------------------------------------------
 * Project Name : Abdal Security Headers
 * File Name : admin.css
 * Programmer : Ebrahim Shafiei (EbraSha)
 * Email : Prof.Shafiei@Gmail.com
 * Created On : 2024-03-19 12:00:00
 * Description : Scoped admin dashboard styles for the security headers settings page
 * -------------------------------------------------------------------
 *
 * "Coding is an engaging and beloved hobby for me. I passionately and insatiably pursue knowledge in cybersecurity and programming."
 * – Ebrahim Shafiei
 *
 **********************************************************************
 */

body.ash-admin-screen #wpfooter {
    display: none;
}

body.ash-admin-screen #wpbody-content {
    padding-bottom: 0;
}

body.ash-admin-screen.ash-modal-open {
    overflow: hidden;
}

body.ash-admin-screen #wpcontent {
    padding-inline: 24px;
}

.wrap.ash-wrap {
    --ash-bg: #f4f6f8;
    --ash-card: #ffffff;
    --ash-border: #e4e8ee;
    --ash-border-strong: #d6dce4;
    --ash-text: #1d2327;
    --ash-muted: #6b7280;
    --ash-accent: #2563eb;
    --ash-accent-hover: #1d4ed8;
    --ash-accent-soft: #eff4ff;
    --ash-accent-ring: rgba(37, 99, 235, 0.18);
    --ash-success: #1a7f37;
    --ash-success-soft: #eaf7ee;
    --ash-purple: #7c3aed;
    --ash-purple-soft: #f3efff;
    --ash-warning: #9a6700;
    --ash-warning-soft: #fff8e5;
    --ash-radius: 12px;
    --ash-radius-sm: 8px;
    --ash-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
    --ash-switch-w: 36px;
    --ash-switch-h: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 12px 0 0;
    padding-inline: 0;
    color: var(--ash-text);
    overflow-x: hidden;
}

.ash-form,
.ash-page-header,
.ash-summary-grid,
.ash-settings-grid,
.ash-card--csp,
.ash-card--assistant,
.ash-form > .ash-card,
.ash-wrap > .ash-card,
.ash-headers-stack,
.ash-headers-stack .ash-card,
.ash-features-stack,
.ash-features-stack .ash-card,
.ash-dashboard-stack,
.ash-dashboard-stack .ash-card,
.ash-action-bar,
.ash-credit {
    width: 100%;
    max-width: none;
}

.ash-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ash-wrap *,
.ash-wrap *::before,
.ash-wrap *::after {
    box-sizing: border-box;
}

.ash-wrap h1,
.ash-wrap h2,
.ash-wrap h3,
.ash-wrap p {
    margin: 0;
    padding: 0;
    color: inherit;
}

.ash-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 24px;
}

.ash-page-header__main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.ash-page-header__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--ash-accent-soft);
    color: var(--ash-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex: 0 0 auto;
}

.ash-page-header__copy {
    min-width: 0;
}

.ash-page-header__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ash-page-header h1 {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--ash-text);
}

.ash-page-header__subtitle {
    margin-top: 6px;
    color: var(--ash-muted);
    font-size: 13px;
    line-height: 1.5;
    max-width: 640px;
}

.ash-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
}

.ash-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.ash-badge--neutral {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}

.ash-badge--success {
    background: var(--ash-success-soft);
    color: var(--ash-success);
    border-color: #cce9d4;
}

.ash-help {
    position: relative;
}

.ash-help__toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--ash-border);
    background: var(--ash-card);
    border-radius: var(--ash-radius-sm);
    color: var(--ash-text);
    cursor: pointer;
    box-shadow: var(--ash-shadow);
    font-size: 13px;
    font-weight: 500;
}

.ash-help__toggle:hover,
.ash-help__toggle:focus {
    border-color: #c5ced8;
    color: var(--ash-text);
}

.ash-help__toggle .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ash-help__menu[hidden] {
    display: none !important;
}

.ash-help__menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    min-width: 200px;
    background: var(--ash-card);
    border: 1px solid var(--ash-border);
    border-radius: var(--ash-radius-sm);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    padding: 6px;
    z-index: 20;
}

.ash-help__menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--ash-text);
    text-decoration: none;
    font-size: 13px;
}

.ash-help__menu a:hover,
.ash-help__menu a:focus {
    background: #f5f7fa;
    color: var(--ash-accent);
    box-shadow: none;
}

.ash-wrap .notice,
.ash-wrap .updated,
.ash-wrap .error {
    margin: 0 0 20px;
}

.ash-summary-grid,
.ash-settings-grid,
.ash-csp-layout,
.ash-csp-grid {
    display: grid;
    gap: 16px;
}

.ash-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.ash-summary-card,
.ash-card,
.ash-csp-panel,
.ash-codebox,
.ash-action-bar,
.ash-modal__dialog {
    background: #ffffff;
    background: var(--ash-card, #ffffff);
    border: 1px solid #e4e8ee;
    border: 1px solid var(--ash-border, #e4e8ee);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}

.ash-summary-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    min-height: 96px;
}

.ash-summary-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: 0 0 auto;
}

.ash-summary-card__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ash-summary-card__label {
    font-size: 12px;
    color: var(--ash-muted);
    font-weight: 500;
}

.ash-summary-card__value {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 600;
}

.ash-summary-card__hint {
    font-size: 12px;
    color: var(--ash-muted);
    line-height: 1.4;
}

.ash-summary-card--green .ash-summary-card__icon {
    background: var(--ash-success-soft);
    color: var(--ash-success);
}

.ash-summary-card--green .ash-summary-card__value {
    color: var(--ash-success);
}

.ash-summary-card--blue .ash-summary-card__icon {
    background: var(--ash-accent-soft);
    color: var(--ash-accent);
}

.ash-summary-card--blue .ash-summary-card__value {
    color: var(--ash-accent);
}

.ash-summary-card--purple .ash-summary-card__icon {
    background: var(--ash-purple-soft);
    color: var(--ash-purple);
}

.ash-summary-card--purple .ash-summary-card__value {
    color: var(--ash-purple);
}

.ash-summary-card--warning .ash-summary-card__icon {
    background: var(--ash-warning-soft);
    color: var(--ash-warning);
}

.ash-summary-card--warning .ash-summary-card__value {
    color: var(--ash-warning);
}

.ash-summary-card--muted .ash-summary-card__icon {
    background: #f3f4f6;
    color: #6b7280;
}

.ash-summary-card--muted .ash-summary-card__value {
    color: #4b5563;
}

.ash-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.ash-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.ash-card__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 14px;
}

.ash-card__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ash-accent-soft);
    color: var(--ash-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
}

.ash-card__icon--warning {
    background: var(--ash-warning-soft);
    color: var(--ash-warning);
}

.ash-card__header > div {
    min-width: 0;
    flex: 1 1 auto;
}

.ash-card__header h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.ash-card__header p {
    margin-top: 4px;
    color: var(--ash-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ash-card__body--list {
    border-top: 1px solid var(--ash-border);
}

.ash-card__footer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--ash-border);
    color: var(--ash-muted);
    font-size: 12px;
    line-height: 1.5;
    background: #fbfcfd;
}

.ash-card__footer .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    color: #9aa3af;
}

.ash-card__title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ash-badge--warning {
    background: var(--ash-warning-soft);
    color: var(--ash-warning);
    border-color: #f0e0a8;
}

.ash-headers-stack,
.ash-features-stack,
.ash-dashboard-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.ash-card__body--padded {
    padding: 16px 20px;
    border-top: 1px solid var(--ash-border);
}

.ash-card__body--padded .ash-section-help {
    padding: 0;
    background: transparent;
}

.ash-card__body--padded .ash-callout {
    margin: 0 0 10px;
}

.ash-card__body--padded .ash-callout:last-child {
    margin-bottom: 0;
}

.ash-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ash-wrap .ash-profile-card {
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    padding: 16px 20px;
    text-align: start;
    font: inherit;
    color: inherit;
    line-height: 1.4;
    cursor: pointer;
}

.ash-profile-card strong {
    font-size: 13px;
    font-weight: 600;
}

.ash-profile-card__desc {
    margin-top: 6px;
    color: var(--ash-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ash-profile-card .ash-callout {
    margin: 10px 0 0;
}

.ash-profile-card.is-selected {
    border-color: var(--ash-accent);
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
    background: var(--ash-accent-soft);
}

.ash-profile-card:focus-visible {
    outline: none;
    border-color: var(--ash-accent);
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
}

.ash-metric-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ash-text);
    flex: 0 0 auto;
}

.ash-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ash-header-card.is-disabled .ash-header-card__config,
.ash-feature-subconfig.is-muted {
    opacity: 0.58;
}

.ash-wrap [hidden] {
    display: none !important;
}

.ash-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--ash-border);
}

.ash-field-row:hover {
    background: #fafbfc;
}

.ash-field-row--block {
    flex-direction: column;
    align-items: stretch;
    padding-block: 12px;
}

.ash-field-row__info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ash-field-row__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ash-text);
}

.ash-field-row__control {
    flex: 0 1 320px;
    min-width: 0;
    max-width: 100%;
}

.ash-field-row--block .ash-field-row__control {
    flex: 1 1 auto;
}

.ash-wrap .ash-select,
.ash-wrap .ash-input,
.ash-wrap .ash-textarea {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 1px solid var(--ash-border-strong);
    border-radius: var(--ash-radius-sm);
    background: #fff;
    color: var(--ash-text);
    box-shadow: none;
    font-size: 13px;
    line-height: 1.4;
}

.ash-wrap .ash-select,
.ash-wrap .ash-input {
    min-height: 38px;
    padding: 0 10px;
}

.ash-wrap .ash-textarea {
    padding: 8px 10px;
    min-height: 78px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    text-align: left;
}

.ash-wrap .ash-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ash-wrap .ash-select:focus,
.ash-wrap .ash-input:focus,
.ash-wrap .ash-textarea:focus {
    border-color: var(--ash-accent);
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
    outline: none;
}

.ash-callout {
    margin: 0 20px 14px;
    padding: 10px 12px;
    border-radius: var(--ash-radius-sm);
    font-size: 12px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ash-callout:not(.ash-callout--warning) {
    background: #fbfcfd;
    color: var(--ash-muted);
    border: 1px solid var(--ash-border);
}

.ash-callout strong {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.ash-callout--warning {
    background: var(--ash-warning-soft);
    color: var(--ash-warning);
    border: 1px solid #f0e0a8;
}

.ash-section-label {
    padding: 10px 20px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ash-muted);
    border-top: 1px solid var(--ash-border);
    background: #fbfcfd;
}

.ash-section-help {
    padding: 0 20px 10px;
    color: var(--ash-muted);
    font-size: 12px;
    line-height: 1.5;
    background: #fbfcfd;
}

.ash-pp-list {
    display: flex;
    flex-direction: column;
}

.ash-pp-item {
    border-bottom: 1px solid var(--ash-border);
}

.ash-pp-item:last-child {
    border-bottom: none;
}

.ash-pp-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 20px;
    background: #fbfcfd;
}

.ash-pp-item__name,
.ash-pp-item__name-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    font-weight: 600;
    direction: ltr;
    text-align: start;
}

.ash-pp-item__name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ash-pp-item__name-input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 280px;
}

.ash-pp-item__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.ash-pp-item__head .ash-toggle-row {
    min-height: 40px;
    padding: 0;
    border-bottom: none;
    gap: 10px;
    white-space: nowrap;
}

.ash-pp-item__head .ash-toggle-row:hover {
    background: transparent;
}

.ash-pp-item__body .ash-field-row:last-child {
    border-bottom: none;
}

.ash-pp-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 16px;
}

.ash-pp-add .ash-input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 320px;
}

.ash-btn--compact {
    min-height: 32px;
    padding: 0 10px;
}

.ash-role-list {
    max-height: 16rem;
    overflow: auto;
    border-bottom: 1px solid var(--ash-border);
}

.ash-role-list .ash-toggle-row:last-child {
    border-bottom: none;
}

.ash-header-card__config > :last-child,
.ash-pp-item__body > :last-child {
    border-bottom: none;
}

.ash-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 0 20px;
    border-bottom: 1px solid var(--ash-border);
}

.ash-toggle-row:last-child {
    border-bottom: none;
}

.ash-toggle-row:hover {
    background: #fafbfc;
}

.ash-toggle-row__info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ash-toggle-row__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ash-text);
    cursor: pointer;
}

.ash-info {
    position: relative;
    display: inline-flex;
    color: #9aa3af;
    cursor: help;
    flex: 0 0 auto;
}

.ash-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ash-info:hover,
.ash-info:focus {
    color: var(--ash-accent);
    outline: none;
}

.ash-switch {
    position: relative;
    width: var(--ash-switch-w);
    height: var(--ash-switch-h);
    flex: 0 0 auto;
    display: inline-block;
}

.ash-wrap .ash-switch input[type="checkbox"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: none;
    border: 0;
    box-shadow: none;
    cursor: pointer;
    z-index: 1;
}

.ash-switch__ui {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.ash-switch__ui::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    inset-inline-start: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease;
}

.ash-switch input:checked + .ash-switch__ui {
    background: var(--ash-accent);
}

.ash-switch input:checked + .ash-switch__ui::before {
    transform: translateX(16px);
}

.rtl .ash-switch input:checked + .ash-switch__ui::before {
    transform: translateX(-16px);
}

.ash-switch input:focus-visible + .ash-switch__ui {
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
}

.ash-card--csp {
    margin-bottom: 16px;
}

.ash-csp-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 20px 20px;
    align-items: stretch;
}

.ash-csp-panel {
    width: 100%;
    max-width: none;
    padding: 16px;
    background: #fbfcfd;
}

.ash-csp-directives h3,
.ash-csp-general h3,
.ash-csp-preview h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ash-csp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.ash-csp-general__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
}

.ash-csp-general__body .ash-toggle-row {
    grid-column: 1 / -1;
}

.ash-csp-general .ash-toggle-row {
    padding: 0;
    min-height: 48px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--ash-border);
}

.ash-csp-general .ash-toggle-row:hover {
    background: transparent;
}

.ash-text-field__label-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.ash-text-field label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ash-text-field__name {
    font-size: 12px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: var(--ash-text);
    direction: ltr;
    text-align: start;
}

.ash-text-field__hint {
    font-size: 11px;
    color: var(--ash-muted);
    font-weight: 400;
}

.ash-wrap .ash-text-field input[type="text"] {
    width: 100%;
    max-width: none;
    min-height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid var(--ash-border-strong);
    border-radius: var(--ash-radius-sm);
    background: #fff;
    color: var(--ash-text);
    box-shadow: none;
    font-size: 13px;
    line-height: 1.4;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    text-align: left;
}

.ash-wrap .ash-text-field input[type="text"]:focus {
    border-color: var(--ash-accent);
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
    outline: none;
}

.ash-wrap .ash-text-field input[data-ash-csp-editor] {
    cursor: pointer;
}

.ash-csp-preview {
    padding: 0 20px 20px;
}

.ash-codebox {
    position: relative;
    background: #f5f8fc;
    border-color: #d7e4f5;
    padding: 14px 44px 14px 14px;
    min-height: 72px;
}

.rtl .ash-codebox {
    padding: 14px 14px 14px 44px;
}

.ash-codebox__content {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-height: 180px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.6;
    color: #1e3a5f;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    text-align: left;
}

.ash-copy {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 28px;
    height: 28px;
    border: 1px solid #d7e4f5;
    background: #fff;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ash-copy:hover,
.ash-copy:focus {
    color: var(--ash-accent);
    border-color: #bcd3f0;
}

.ash-copy.is-copied {
    color: var(--ash-success);
    border-color: #cce9d4;
}

.ash-copy .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ash-form.is-csp-off [data-ash-csp-panel] {
    opacity: 0.72;
}

.ash-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 12px 20px;
}

.ash-action-bar__note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ash-muted);
    font-size: 12px;
    line-height: 1.4;
}

.ash-action-bar__note .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.ash-action-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.ash-credit {
    margin-block: 24px 16px;
    margin-inline: 0;
    padding: 0;
    text-align: center;
    color: var(--ash-muted);
    font-size: 13px;
    line-height: 1.6;
}

.ash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    box-shadow: none;
}

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

.ash-btn--primary {
    background: var(--ash-accent);
    color: #fff;
}

.ash-btn--primary:hover,
.ash-btn--primary:focus {
    background: var(--ash-accent-hover);
    color: #fff;
}

.ash-btn--primary:disabled {
    opacity: 0.7;
    cursor: default;
}

.ash-btn--secondary:disabled {
    opacity: 0.7;
    cursor: default;
}

.ash-btn--secondary {
    background: #fff;
    color: #374151;
    border-color: var(--ash-border-strong);
}

.ash-btn--secondary:hover,
.ash-btn--secondary:focus {
    background: #f8fafc;
    color: var(--ash-text);
}

.ash-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ash-spin 0.7s linear infinite;
    flex: 0 0 auto;
}

.ash-btn--secondary .ash-spinner {
    border-color: rgba(55, 65, 81, 0.2);
    border-top-color: #374151;
}

.ash-form.is-saving .ash-spinner,
.ash-btn.is-busy .ash-spinner {
    display: inline-block;
}

.ash-btn.is-busy {
    cursor: wait;
}

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

.ash-modal[hidden] {
    display: none !important;
}

.ash-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: block;
}

.ash-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.ash-modal__dialog {
    position: relative;
    width: min(420px, calc(100% - 32px));
    margin: 18vh auto 0;
    padding: 22px 22px 18px;
}

.ash-modal__dialog h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.ash-modal__dialog p {
    color: var(--ash-muted);
    font-size: 13px;
    line-height: 1.5;
    min-height: 1.5em;
}

.ash-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.ash-wp-modal__message {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.ash-wp-modal__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ash-modal--editor:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ash-modal--editor .ash-modal__dialog {
    display: flex;
    flex-direction: column;
    width: min(960px, 100%);
    height: min(80vh, 720px);
    max-height: calc(100vh - 32px);
    margin: 0;
    padding: 16px;
    z-index: 1;
}

.ash-modal--editor .ash-modal__dialog h2 {
    flex: 0 0 auto;
    margin-bottom: 12px;
}

.ash-csp-editor__body {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
}

.ash-modal--editor #ash-csp-editor-text {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--ash-border-strong);
    border-radius: var(--ash-radius-sm);
    background: #fff;
    color: var(--ash-text);
    box-shadow: none;
    resize: none;
    font-size: 14px;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    overflow: auto;
}

.ash-modal--editor #ash-csp-editor-text:focus {
    border-color: var(--ash-accent);
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
    outline: none;
}

.ash-modal--editor .ash-modal__actions {
    flex: 0 0 auto;
    margin-top: 12px;
}

@media only screen and (max-width: 960px) {
    .ash-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ash-csp-layout {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 782px) {
    body.ash-admin-screen #wpcontent {
        padding-inline: 16px;
    }

    .wrap.ash-wrap {
        margin-top: 8px;
    }

    .ash-page-header {
        flex-direction: column;
    }

    .ash-settings-grid,
    .ash-csp-grid,
    .ash-csp-general__body,
    .ash-profile-grid {
        grid-template-columns: 1fr;
    }

    .ash-field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ash-field-row__control {
        flex: 1 1 auto;
        max-width: none;
    }

    .ash-pp-item__head {
        flex-direction: column;
        align-items: stretch;
    }

    .ash-pp-item__actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .ash-pp-item__name-input,
    .ash-pp-add .ash-input {
        max-width: none;
    }

    .ash-pp-add {
        flex-direction: column;
        align-items: stretch;
    }

    .ash-action-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .ash-action-bar__actions {
        width: 100%;
    }

    .ash-action-bar__actions .ash-btn {
        flex: 1 1 auto;
    }

    .ash-modal--editor:not([hidden]) {
        padding: 8px;
        align-items: stretch;
    }

    .ash-modal--editor .ash-modal__dialog {
        width: 100%;
        height: calc(100vh - 16px);
        max-height: none;
    }
}

@media screen and (max-width: 600px) {
    .ash-summary-grid {
        grid-template-columns: 1fr;
    }

    .ash-page-header__title-row {
        align-items: flex-start;
    }

    .ash-page-header h1 {
        font-size: 20px;
    }

    .ash-assistant__controls,
    .ash-assistant__actions,
    .ash-assistant-row-actions {
        flex-wrap: wrap;
    }
}

.ash-card--assistant {
    margin-bottom: 16px;
    scroll-margin-top: 24px;
}

.ash-assistant__body {
    padding: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ash-assistant__status-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.ash-assistant__label {
    display: block;
    font-size: 12px;
    color: var(--ash-muted);
    margin-bottom: 4px;
}

.ash-assistant__status {
    font-size: 16px;
}

.ash-assistant__controls,
.ash-assistant__actions,
.ash-assistant-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ash-assistant__controls {
    flex-wrap: wrap;
    align-items: flex-end;
    min-width: 0;
    max-width: 100%;
}

.ash-assistant__duration {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
}

.ash-assistant__duration-label {
    font-size: 12px;
    color: var(--ash-muted);
}

.ash-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    gap: 1px;
    overflow: hidden;
    background: var(--ash-border);
    border: 1px solid var(--ash-border-strong);
    border-radius: 8px;
}

.ash-segmented__item {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.ash-wrap .ash-segmented__item input[type="radio"] {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.ash-segmented__text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    padding: 0 8px;
    box-sizing: border-box;
    background: #ffffff;
    color: var(--ash-text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}

.ash-segmented__item:hover input[type="radio"]:not(:checked):not(:disabled) + .ash-segmented__text {
    background: var(--ash-accent-soft);
}

.ash-segmented__item input[type="radio"]:checked + .ash-segmented__text {
    background: var(--ash-accent);
    color: #ffffff;
}

.ash-segmented__item input[type="radio"]:focus-visible + .ash-segmented__text {
    box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 4px var(--ash-accent);
}

.ash-segmented.is-disabled .ash-segmented__item,
.ash-segmented__item input[type="radio"]:disabled {
    cursor: not-allowed;
}

.ash-segmented.is-disabled {
    opacity: 0.7;
}

.ash-assistant__learning,
.ash-assistant__continuous {
    margin: 0;
    font-size: 13px;
}

.ash-assistant__toggles {
    border: 1px solid var(--ash-border);
    border-radius: var(--ash-radius-sm);
    overflow: hidden;
    background: #fafbfc;
}

.ash-assistant__toggles .ash-toggle-row {
    min-height: 48px;
    padding: 10px 14px;
    background: transparent;
}

.ash-assistant__toggles .ash-toggle-row:hover {
    background: #f3f6fa;
}

.ash-assistant__toggles .ash-toggle-row[hidden] {
    display: none !important;
}

.ash-disk-scope {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--ash-border);
    border-radius: var(--ash-radius-sm);
    background: #fff;
}

.ash-disk-scope[hidden] {
    display: none;
}

.ash-disk-scope__groups {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ash-disk-scope__groups.has-scroll {
    max-height: 22rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-inline-end: 4px;
}

.ash-disk-scope__group-title {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 4px 0 0;
    padding: 6px 2px;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ash-muted);
}

.ash-disk-scope .ash-toggle-row {
    min-height: 44px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--ash-border);
}

.ash-disk-scope .ash-toggle-row:last-child {
    border-bottom: none;
}

.ash-disk-scope__slug {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    color: var(--ash-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    unicode-bidi: isolate;
}

.ash-disk-scope.is-locked .ash-switch,
.ash-assistant__toggles .ash-toggle-row.is-locked .ash-switch {
    pointer-events: none;
    opacity: 0.55;
}

.ash-disk-scan {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--ash-border);
    border-radius: var(--ash-radius-sm);
    background: #fff;
}

.ash-disk-scan[hidden] {
    display: none;
}

.ash-disk-scan__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ash-disk-scan__meta {
    margin: 0;
    font-size: 13px;
    color: var(--ash-muted);
}

.ash-disk-exclusions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--ash-border);
    border-radius: var(--ash-radius-sm);
    background: #fff;
}

.ash-disk-exclusions[hidden] {
    display: none;
}

.ash-disk-exclusions__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ash-disk-exclusions__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ash-disk-exclusion {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    padding: 4px 6px 4px 10px;
    border-radius: 999px;
    background: var(--ash-accent-soft);
    color: var(--ash-text);
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    unicode-bidi: isolate;
}

.ash-disk-exclusion__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ash-disk-exclusion__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ash-muted);
    cursor: pointer;
}

.ash-disk-exclusion__remove:hover,
.ash-disk-exclusion__remove:focus {
    color: #b42318;
    background: #fff;
    outline: none;
}

.ash-disk-exclusions__empty,
.ash-disk-exclusions__message {
    margin: 0;
    font-size: 12px;
    color: var(--ash-muted);
}

.ash-disk-exclusions__message.is-error {
    color: #b42318;
}

.ash-disk-exclusions__add {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ash-wrap .ash-disk-exclusions__input {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    min-height: 36px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--ash-border-strong);
    border-radius: var(--ash-radius-sm);
    background: #fff;
    color: var(--ash-text);
    box-shadow: none;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    direction: ltr;
    text-align: left;
}

.ash-wrap .ash-disk-exclusions__input:focus {
    border-color: var(--ash-accent);
    box-shadow: 0 0 0 3px var(--ash-accent-ring);
    outline: none;
}

.ash-disk-exclusions.is-locked .ash-disk-exclusions__input,
.ash-disk-exclusions.is-locked .ash-disk-exclusion__remove,
.ash-disk-exclusions.is-locked [data-ash-disk-exclusion-add],
.ash-disk-exclusions.is-locked [data-ash-disk-exclusion-reset] {
    pointer-events: none;
    opacity: 0.55;
}

.ash-progress {
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.ash-progress__bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #dc2626;
    transform-origin: left center;
    transition: width 0.25s ease, background-color 0.35s ease;
}

.rtl .ash-progress__bar {
    transform-origin: right center;
}

.ash-progress.is-counting .ash-progress__bar {
    width: 32%;
    animation: ash-progress-indeterminate 1.15s ease-in-out infinite;
}

@keyframes ash-progress-indeterminate {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(320%);
    }
}

.rtl .ash-progress.is-counting .ash-progress__bar {
    animation-name: ash-progress-indeterminate-rtl;
}

@keyframes ash-progress-indeterminate-rtl {
    0% {
        transform: translateX(110%);
    }
    100% {
        transform: translateX(-320%);
    }
}

.ash-segmented.is-locked-manual {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18);
}

.ash-segmented.is-locked-manual .ash-segmented__item input[type="radio"]:disabled + .ash-segmented__text {
    opacity: 0.45;
}

.ash-assistant__banner {
    padding: 10px 12px;
    border: 1px solid var(--ash-warning, #9a6700);
    background: var(--ash-warning-soft, #fff8e5);
    border-radius: 8px;
    font-size: 13px;
}

.ash-assistant__summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.ash-assistant-stat {
    border: 1px solid var(--ash-border);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfcfd;
    font-size: 12px;
    font-weight: 600;
}

.ash-assistant__table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ash-border);
    border-radius: 12px;
}

.ash-assistant__table-wrap.has-scroll {
    max-height: 36.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ash-assistant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ash-assistant-table th,
.ash-assistant-table td {
    padding: 10px 12px;
    text-align: start;
    border-bottom: 1px solid var(--ash-border);
    vertical-align: top;
}

.ash-assistant-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    font-weight: 600;
    box-shadow: 0 1px 0 var(--ash-border);
}

.ash-assistant-origin {
    direction: ltr;
    unicode-bidi: isolate;
    font-size: 12px;
}

.ash-assistant-status--added {
    color: var(--ash-success);
    font-weight: 700;
}

.ash-assistant-confidence {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.ash-assistant-confidence--trusted {
    background: var(--ash-success-soft);
    color: var(--ash-success);
}

.ash-assistant-confidence--likely_safe {
    background: var(--ash-accent-soft);
    color: var(--ash-accent);
}

.ash-assistant-confidence--unknown {
    background: #eef2f6;
    color: var(--ash-muted);
}

.ash-assistant-confidence--potentially_risky {
    background: var(--ash-warning-soft);
    color: var(--ash-warning);
}

.ash-assistant-modal__dialog {
    width: min(720px, calc(100% - 32px));
    max-height: min(80vh, 720px);
    overflow: auto;
}

.ash-assistant-details {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 8px 16px;
    margin: 0;
}

.ash-assistant-details dt {
    font-weight: 600;
    color: var(--ash-muted);
}

.ash-assistant-details dd {
    margin: 0;
    direction: ltr;
    unicode-bidi: isolate;
}

.ash-assistant-diff {
    margin-bottom: 16px;
}

.ash-assistant-diff h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.ash-assistant-diff code {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    white-space: pre-wrap;
    word-break: break-word;
}

.ash-assistant-diff__new {
    color: var(--ash-success);
    direction: ltr;
    unicode-bidi: isolate;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ash-wrap .ash-transfer {
    display: grid;
    gap: 20px;
}

.ash-wrap > [data-ash-settings-transfer] {
    margin-bottom: 16px;
}

.ash-wrap .ash-transfer__block {
    display: grid;
    gap: 12px;
}

.ash-wrap .ash-transfer__block + .ash-transfer__block {
    padding-top: 16px;
    border-top: 1px solid var(--ash-border);
}

.ash-wrap .ash-transfer__file {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.ash-wrap .ash-transfer__filename {
    color: var(--ash-muted);
    font-size: 12px;
    line-height: 1.4;
    min-width: 0;
    word-break: break-word;
}

.ash-wrap .ash-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
