.aiomatic-task-container {
    max-width: 100%;
}

.aiomatic-field {
    margin-bottom: 15px;
}

.aiomatic-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d2327;
}

.aiomatic-field textarea, 
.aiomatic-field input[type="text"] {
    width: 100%;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.aiomatic-toggle-wrapper {
    margin: 10px 0 20px 0;
}

.aiomatic-toggle-btn {
    background: none;
    border: none;
    color: #2271b1;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.aiomatic-toggle-btn:hover {
    color: #135e96;
}

.aiomatic-toggle-btn .aiomatic-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.aiomatic-toggle-btn.is-active .aiomatic-icon {
    transform: rotate(180deg);
}
.aiomatic-refine-btn {
    position: relative;
    top:-3px;
    font-size:11px;
    padding:2px 6px;
}
.aiomatic-goal-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:6px;
}
.aiomatic-highlight {
    animation: aiomaticFlash 1.2s ease;
}
.aiomatic-goal-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
}
.aiomatic-running {
    animation: aiomaticPulse 1.5s infinite;
}

@keyframes aiomaticPulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.more-xcss {
    transition: background 0.3s ease;
}
.aiomatic-goal-row label {
    margin:0;
    font-weight:600;
}

.aiomatic-refine-btn {
    font-size:12px;
    padding:4px 10px;
    white-space:nowrap;
}

.aiomatic-hint {
    display:block;
    margin:4px 0 6px;
    color:#666;
    font-size:12px;
}
@keyframes aiomaticFlash {
    0%   { background:#fff7cc; }
    100% { background:transparent; }
}
.aiomatic-refine-btn {
    font-size:12px;
    padding:4px 8px;
}
.aiomatic-extra-fields {
    border-top: 1px solid #f0f0f1;
    padding-top: 15px;
    margin-bottom: 15px;
}
.bulkactions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.aiomatic-topbar {
    margin: 10px 0 5px;
}
.aiomatic-topbar .button {
    font-weight: 500;
}
.aiomatic-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    overflow-y: auto;
    padding: 40px 20px;
    padding-top: 60px;
    box-sizing: border-box;
}
.aiomatic-modal-content {
    background: #fff;
    width: 700px;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    margin: 0 auto;
    padding: 20px;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
}
.aiomatic-modal-content {
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.aiomatic-modal::-webkit-scrollbar,
.aiomatic-modal-content::-webkit-scrollbar {
    width: 6px;
}
.aiomatic-modal-content {
    display: flex;
    flex-direction: column;
}
.aiomatic-modal-content textarea {
    max-height: 150px;
}
.aiomatic-modal::-webkit-scrollbar-thumb,
.aiomatic-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 6px;
}
.aiomatic-field {
    margin-bottom: 12px;
}
.aiomatic-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.aiomatic-field textarea,
.aiomatic-field input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
    box-sizing: border-box;
}
.aiomatic-field select {
    width: 100%;
}
.aiomatic-field textarea {
    min-height: 80px;
    resize: vertical;
}
.aiomatic-modal-actions {
    margin-top: 10px;
}
#aiomatic_task_result {
    margin-top: 15px;
    background: #0b1220;
    color: #e6edf3;
    padding: 10px;
    border-radius: 6px;
    height: 150px;
    overflow: auto;
    min-height: 150px;
    max-height: 400px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.4;
}
.aiomatic-result-wrapper {
    margin-top: 15px;
    background: #0b1220;
    border-radius: 8px;
    border: 1px solid #1f2a44;
    overflow: hidden;
    position: relative;
}

.aiomatic-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111a2e;
    padding: 8px 12px;
    font-size: 13px;
    color: #9fb3c8;
    border-bottom: 1px solid #1f2a44;
}

.aiomatic-result-btn {
    background: transparent;
    border: none;
    color: #9fb3c8;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.aiomatic-result-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

#aiomatic_task_result {
    padding: 10px;
    color: #e6edf3;
    height: 150px;
    min-height: 150px;
    max-height: 400px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.4;
    transition: all 0.25s ease;
}

.aiomatic-result-expanded #aiomatic_task_result {
    height: calc(100vh - 200px);
    max-height: none;
}
.aiomatic-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    z-index: 999998;
}
.aiomatic-result-expanded {
    position: fixed;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    z-index: 9999999; /* bump this hard */
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border-radius: 10px;
}
.aiomatic-result-expanded {
    position: fixed;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 40px;
    z-index: 999999;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    border-radius: 10px;
}
.aiomatic-back-inline {
    margin-left: 8px;
}
.wrap h1.wp-heading-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.aiomatic-prompt-title{
    font-size:13px;
    color:#1d2327;
}
.aiomatic-prompt-desc{
    margin-top:2px;
}
.aiomatic-tip{
    margin-top:10px;
    padding:10px 12px;
    background:#f6f7f7;
    border:1px solid #dcdcde;
    border-radius:6px;
    font-size:12px;
    color:#3c434a;
}
.post-type-aiomatic_agent #content{
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size:13px;
}
#side-sortables .postbox{
    margin-bottom:12px;
}
.aiomatic-prompt-header {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-left: 4px solid #2271b1;
    padding: 12px 14px;
    margin-top: 10px;
    border-radius: 4px;
}
.aiomatic-prompt-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.aiomatic-prompt-desc {
    color: #646970;
    font-size: 13px;
}
#aiomatic_agent_settings .inside label {
    display: block;
    margin-top: 10px;
    font-weight: 500;
}
.aiomatic-logs-modal {
    width: 700px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.aiomatic-logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.aiomatic-log-item {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
}
.aiomatic-log-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}
.aiomatic-log-type {
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}
.aiomatic-log-time {
    font-size: 11px;
    color: #666;
}
.aiomatic-log-message {
    font-size: 13px;
    color: #333;
    white-space: pre-wrap;
    overflow: auto;
}
.aiomatic-empty {
    padding: 20px;
    text-align: center;
    color: #999;
}
.aiomatic-modal-close
{
    cursor: pointer;
}
.aiomatic-step {
    font-weight: bold;
    margin: 15px 0 5px;
    color: #555;
}
.aiomatic-logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.aiomatic-log-step {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #fff;
}

.aiomatic-log-step-header {
    background: #f6f7f7;
    padding: 6px 10px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.aiomatic-log-event {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.aiomatic-log-event:last-child {
    border-bottom: none;
}

.aiomatic-log-block {
    background: #1e1e1e;
    color: #dcdcdc;
    padding: 6px;
    font-size: 11px;
    overflow-x: auto;
}

.aiomatic-log-time {
    font-size: 10px;
    color: #777;
    margin-top: 4px;
}
.aiomatic-action {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.aiomatic-action-neutral {
    color: #2271b1;
}

.aiomatic-action-neutral:hover {
    color: #135e96;
    text-decoration: underline;
}

.aiomatic-action-success {
    background: #ecf7ed;
    color: #2e7d32;
    border-color: #c8e6c9;
}
.aiomatic-action-success:hover {
    background: #dff3e3;
    color: #1b5e20;
}
.aiomatic-prompt-header {
    border-left: 4px solid #2271b1;
    background: #f6f7f7;
    padding: 10px 12px;
    border-radius: 4px;
}
.aiomatic-agent-settings p {
    margin-bottom: 14px;
}
.aiomatic-agent-settings label strong {
    display: inline-block;
    margin-bottom: 3px;
}
.aiomatic-tools-list {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
}
.aiomatic-tip {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 12px;
}
.aiomatic-prompt-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.aiomatic-prompt-desc {
    font-size: 12px;
    color: #646970;
}
.aiomatic-editor-wrapper {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    margin-bottom: 15px;
}
.aiomatic-monitor {
    padding: 10px 4px;
}

.aiomatic-monitor-status {
    margin-bottom: 10px;
}

.aiomatic-status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    color: #fff;
    border-radius: 4px;
    text-transform: lowercase;
    font-weight: 500;
}
.aiomatic-monitor-actions-extended {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.aiomatic-monitor-actions-extended .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    height: auto;
}

.aiomatic-monitor-actions-extended .dashicons {
    font-size: 16px;
    line-height: 1;
}
.aiomatic-monitor-section {
    margin-bottom: 10px;
}

.aiomatic-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

.aiomatic-value {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.aiomatic-monitor-actions {
    margin-top: 12px;
}
.aiomatic-action-danger {
    background: #fdecea;
    color: #c62828;
    border-color: #f5c6cb;
}

.aiomatic-action-danger:hover {
    background: #f8d7da;
    color: #8e0000;
    border: 1px solid #f5c6cb!important;
    border-color: #f5c6cb;
}

.aiomatic-action-warning {
    color: #b26a00;
    border-color: #ffe0b2;
}

.aiomatic-action-warning:hover {
    background: #ffefcc;
    color: #8a4b00;
}
.aiomatic-action-success {
    background: #e6f4ea;
    color: #1b5e20;
    border-color: #c8e6c9;
}

.aiomatic-action-success:hover {
    background: #d4edda;
    color: #0f3d13;
}
.row-actions .aiomatic-action {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    white-space: nowrap;
}
.row-actions span {
    margin-right: 6px;
}

.row-actions span::after {
    display: none !important;
}
.aiomatic-action {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
    text-decoration: none;
    transition: all 0.15s ease;
}
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.row-actions a {
    text-decoration: none;
}
.aiomatic-action-neutral {
    background: #eef3f7;
    color: #1d4f7a;
    border: 1px solid #d0dbe5;
    text-decoration: none;
}
.aiomatic-action {
    box-shadow: 0 1px 0 rgba(0,0,0,0.03);
}
.aiomatic-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.row-actions .aiomatic-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
}
.row-actions span {
    margin-right: 4px;
}
.aiomatic-action-edit {
    background: #f6f7f7;
    color: #2c3338;
    border: 1px solid #dcdcde;
}
.aiomatic-action-logs .dashicons {
    opacity: 0.6;
}
.aiomatic-action-logs {
    background: #f4f6f8;
    color: #4a5568;
    border: 1px solid #d6dde5;
}

.aiomatic-action-logs:hover {
    background: #e9eef3;
    color: #2d3748;
}
.aiomatic-action-edit:hover {
    background: #f0f0f1;
    color: #1d2327;
}
.aiomatic-action-logs {
    color: #a26a40;
    color: #2271b1;
    border: 1px solid #c3d4e6;
}

.aiomatic-action-logs:hover {
    background: #e0e6ec;
    color: #135e96;
    border-style: solid;
}
.row-actions span::after {
    display: none !important;
}
.row-actions .aiomatic-action .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    opacity: 0.75;
}
.aiomatic-action {
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 500;
}
.aiomatic-action .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    opacity: 0.75;
}
.aiomatic-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
}
.aiomatic-action .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}
.aiomatic-action:hover {
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.row-actions .aiomatic-action,
.row-actions .aiomatic-action:hover,
.row-actions .aiomatic-action:focus {
    text-decoration: none !important;
}
.aiomatic-action-neutral:hover {
    background: #e2edf6;
    color: #0b3c66;
}
.row-actions a:not(.aiomatic-action) {
    color: #646970;
}

.row-actions a:not(.aiomatic-action):hover {
    color: #2271b1;
}
.aiomatic-tooltip {
    display:inline-block;
    width:16px;
    height:16px;
    line-height:16px;
    text-align:center;
    border-radius:50%;
    background:#2271b1;
    color:#fff;
    font-size:11px;
    cursor:help;
    margin-left:6px;
    vertical-align:middle;
}
#aiomatic_agents_default_btn
{
    margin-bottom:10px;
}
.aiomatic-tooltip:hover {
    background:#135e96;
}
.the-css-class
{
    max-height:500px; 
    overflow:auto;
}
.column-agent_avatar {
    max-width: 50px;
}
.column-agent_actions {
    max-width: 50px;
}
.column-agent_task {
    max-width: 200px;
}
.column-agent_status {
    max-width: 80px;
}
.column-agent_last {
    max-width: 200px;
}
.margin-10
{
    margin-bottom:10px;
}
.aiomatic-tool-group label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-left: 10px;
    line-height: 1.3;
}

.aiomatic-tool-group label input {
    margin-top: 2px;
    flex-shrink: 0;
}

.aiomatic-tool-group label span {
    word-break: break-word;
}
.color-ai
{
    color:#46b450;
}
.more-xcss
{
    display:inline-block;
    padding:3px 8px;
    border-radius:4px;
    color:#fff;
    font-size:11px;
}
.minimal-css
{
    border-bottom:1px solid #eee; 
    padding:6px 0;
}
.css-opt
{
    color:#888; 
    margin:4px 0 0 22px;
}
.new-ccss
{
    max-height:150px; 
    overflow:auto; 
    border:1px solid #ddd; 
    padding:8px; 
}
.max-css
{
    max-height:200px; 
    overflow:auto;
}
@media screen and (max-width: 782px) {

    .column-agent_avatar
    {
        display: none!important;
    }
    .wp-list-table thead {
        display: none;
    }

    .wp-list-table tr {
        display: block;
        margin-bottom: 14px;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 12px;
        background: #fff;
    }

    .wp-list-table td {
        display: block;
        width: 100% !important;
        padding: 0;
        border: none;
    }

    .wp-list-table td::before {
        display: none !important;
        content: none !important;
    }

    .check-column {
        display: inline-block;
        margin-bottom: 8px;
    }

    .column-agent_avatar {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 6px;
    }

    .column-agent_avatar img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .column-title {
        display: inline-block;
        vertical-align: middle;
        margin-left: 10px;
        font-size: 14px;
        font-weight: 500;
    }

    .column-title a {
        display: inline-block;
        line-height: 1.3;
    }

    .column-agent_status {
        margin-top: 6px;
    }

    .column-agent_actions {
        margin-top: 10px;
    }

    .column-agent_actions .button {
        width: 100%;
        text-align: center;
    }

    .row-actions {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 10px;
        padding-top: 8px;
        border-top: 1px solid #eee;

        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .wp-list-table tr:not(:hover) .row-actions {
        visibility: visible !important;
    }

    .column-date,
    .column-agent_last {
        display: none;
    }
    .row-actions .aiomatic-action {
        padding: 6px 10px;
        font-size: 12px;
        line-height: 1.4;
        border-radius: 6px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: auto;
        min-height: 32px;
    }

    .row-actions .aiomatic-action .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }

    .row-actions {
        gap: 8px;
    }
}