.aisoftapp-wrap .aisoftapp-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin-top: 20px;
}
.aisoftapp-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.aisoftapp-card label {
    display: block;
    margin-top: 16px;
    margin-bottom: 6px;
}
.aisoftapp-card textarea,
.aisoftapp-card input,
.aisoftapp-card select {
    border-radius: 6px;
}
.aisoftapp-help ul {
    margin-left: 18px;
    list-style: disc;
}
.aisoftapp-details {
    background: #fff;
    padding: 16px;
    border: 1px solid #dcdcde;
    margin: 16px 0;
}
.aisoftapp-details pre {
    white-space: pre-wrap;
    max-height: 360px;
    overflow: auto;
}
.aisoftapp-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
}
.aisoftapp-meta-grid p {
    margin: 0;
}
@media (max-width: 900px) {
    .aisoftapp-wrap .aisoftapp-grid,
    .aisoftapp-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Premium design system (2.0) ---- */
.aisoftapp-wrap {
    max-width: 1200px;
}
.aisoftapp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
    color: #fff;
    border-radius: 12px;
    padding: 22px 26px;
    margin: 18px 0 22px;
}
.aisoftapp-header-brand {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.aisoftapp-header-brand .dashicons {
    font-size: 34px;
    width: 34px;
    height: 34px;
    color: #7cd6ff;
    margin-top: 4px;
}
.aisoftapp-header-brand h1 {
    color: #fff;
    margin: 0 0 4px;
    padding: 0;
    font-size: 22px;
}
.aisoftapp-tagline {
    margin: 0;
    color: #c3c9cf;
    font-size: 13px;
    max-width: 520px;
}
.aisoftapp-header-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.aisoftapp-header-links a {
    color: #cdeeff;
    text-decoration: none;
    font-size: 13px;
}
.aisoftapp-header-links a:hover {
    color: #fff;
    text-decoration: underline;
}
.aisoftapp-version-badge {
    background: rgba(255,255,255,.12);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    letter-spacing: .02em;
}
.aisoftapp-card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-top: 0;
}
.aisoftapp-progress-bar {
    background: #eef0f1;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin: 8px 0 4px;
}
.aisoftapp-progress-bar-fill {
    background: linear-gradient(90deg, #2271b1, #72aee6);
    height: 100%;
    border-radius: 999px;
    transition: width .3s ease;
}
.aisoftapp-progress-label {
    font-size: 12px;
    color: #646970;
    margin: 0 0 14px;
}
.aisoftapp-checklist {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}
.aisoftapp-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
}
.aisoftapp-checklist .dashicons-yes-alt {
    color: #00a32a;
}
.aisoftapp-checklist .dashicons-marker {
    color: #b32d2e;
}
.aisoftapp-checklist li.aisoftapp-check-done a {
    text-decoration: line-through;
    color: #646970;
}
.aisoftapp-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 600;
    background: #f0f0f1;
    color: #3c434a;
}
.aisoftapp-pill-active {
    background: #edfaef;
    color: #00722c;
}
.aisoftapp-pill-active-grace-period {
    background: #fcf9e8;
    color: #8a6d00;
}
.aisoftapp-pill-expired,
.aisoftapp-pill-disabled {
    background: #fcf0f1;
    color: #b32d2e;
}
.aisoftapp-pill-inactive {
    background: #f0f0f1;
    color: #646970;
}
.aisoftapp-table-scroll {
    overflow-x: auto;
    max-width: 100%;
}
.aisoftapp-taxonomy-table th,
.aisoftapp-taxonomy-table td {
    vertical-align: top;
    padding: 10px 8px;
    white-space: nowrap;
}
.aisoftapp-taxonomy-table select {
    max-width: 100%;
}

/* The two auto-fill buttons sit in separate forms so that pressing Enter in
   the source-row inputs below still saves rather than re-running a fill. */
.aisoftapp-autofill-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.aisoftapp-autofill-actions form {
    margin: 0;
}

/* Per-category source/region rows: cards instead of a wide table, so no
   column ever gets squeezed into an unusably narrow width. */
.aisoftapp-source-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 16px 0;
}
.aisoftapp-source-row {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fbfbfc;
}
.aisoftapp-source-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.aisoftapp-source-row-title {
    font-size: 14px;
}
.aisoftapp-source-row-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}
.aisoftapp-source-row-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}
.aisoftapp-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #646970;
}
.aisoftapp-field input,
.aisoftapp-field textarea {
    width: 100%;
}
.aisoftapp-field-wide {
    grid-column: 1 / -1;
}
@media (max-width: 782px) {
    .aisoftapp-source-row-grid {
        grid-template-columns: 1fr;
    }
}
