.act-host-card {
    border: 0;
}

.act-host-card > .card-body {
    padding: 0;
}

.act-tool {
    --act-primary: #0f6bff;
    --act-primary-dark: #0748b8;
    --act-teal: #0d9488;
    --act-teal-dark: #0f766e;
    --act-amber: #b7791f;
    --act-red: #c93327;
    --act-ink: #172033;
    --act-muted: #667085;
    --act-soft: #f5f8fc;
    --act-soft-2: #edf4fb;
    --act-line: #d8e2ee;
    --act-white: #fff;
    --act-radius: 8px;
    --act-shadow: 0 14px 32px rgba(16, 40, 72, .09);
    width: 100%;
    color: var(--act-ink);
}

.act-tool * {
    box-sizing: border-box;
}

.act-tool button,
.act-tool input,
.act-tool select,
.act-tool output {
    font: inherit;
}

.act-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid #b8d6ff;
    border-left: 4px solid var(--act-primary);
    border-radius: var(--act-radius);
    background: #f2f7ff;
    color: #194570;
    font-size: 13px;
    line-height: 1.55;
}

.act-alert strong {
    display: block;
    color: #123963;
    font-size: 14px;
}

.act-alert span {
    color: #45637f;
}

.act-engine-state {
    justify-self: end;
    padding: 7px 10px;
    border: 1px solid rgba(15, 107, 255, .22);
    border-radius: 999px;
    background: #fff;
    color: #0b4e9d !important;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.act-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px;
    border: 1px solid var(--act-line);
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fbff, #edf4fb);
}

.act-tab {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-height: 58px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #0b4e9d;
    text-align: left;
    cursor: pointer;
    transition: background .2s, border-color .2s, box-shadow .2s, transform .2s;
}

.act-tab:hover {
    border-color: #b8d6ff;
    background: rgba(255, 255, 255, .74);
}

.act-tab.active {
    border-color: #8bbdff;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 107, 255, .16);
    color: #0a48bf;
}

.act-tab.is-done {
    color: var(--act-teal-dark);
}

.act-tab-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #dcecff;
    color: #0a48bf;
    font-size: 12px;
    font-weight: 900;
}

.act-tab.active .act-tab-index {
    background: var(--act-primary);
    color: #fff;
}

.act-tab b {
    display: block;
    font-size: 14px;
    line-height: 1.2;
}

.act-tab small {
    display: block;
    margin-top: 3px;
    color: var(--act-muted);
    font-size: 12px;
    line-height: 1.2;
}

.act-panel-tab {
    display: none;
}

.act-panel-tab.active {
    display: block;
}

.act-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
    gap: 16px;
    align-items: start;
}

.act-panel {
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #fff;
    box-shadow: var(--act-shadow);
    overflow: hidden;
}

.act-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--act-line);
    background: #f8fbff;
}

.act-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #16233a;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.act-note {
    margin: 5px 0 0;
    color: var(--act-muted);
    font-size: 12px;
    line-height: 1.45;
}

.act-panel-body {
    padding: 16px;
}

.act-drop {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 226px;
    padding: 26px;
    border: 2px dashed #9ec8ff;
    border-radius: var(--act-radius);
    background: linear-gradient(135deg, #f7fbff, #f1f8f6);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .2s;
}

.act-drop:hover,
.act-drop.dragging {
    border-color: var(--act-teal);
    background: #f1fbf9;
    transform: translateY(-1px);
}

.act-drop input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.act-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    border-radius: 50%;
    background: #dcecff;
    color: var(--act-primary);
    font-size: 27px;
}

.act-drop-main {
    display: block;
    color: #16233a;
    font-size: 16px;
    font-weight: 900;
}

.act-drop-sub {
    display: block;
    margin-top: 6px;
    color: var(--act-muted);
    font-size: 12px;
}

.act-stat-grid,
.act-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.act-stat,
.act-summary > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: var(--act-soft);
}

.act-stat {
    text-align: center;
}

.act-stat-value,
.act-summary b {
    display: block;
    color: #0d3f84;
    font-size: 18px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-stat-label,
.act-summary span {
    display: block;
    margin-bottom: 3px;
    color: var(--act-muted);
    font-size: 12px;
}

.act-summary b {
    color: #16233a;
    font-size: 14px;
}

.act-file-list,
.act-results,
.act-error-list {
    display: grid;
    gap: 10px;
}

.act-file-list {
    max-height: 420px;
    overflow: auto;
    padding-right: 2px;
}

.act-file-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 11px;
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #fff;
}

.act-file-name,
.act-result-name {
    color: #18202f;
    font-size: 13px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.act-file-meta,
.act-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: var(--act-muted);
    font-size: 12px;
}

.act-file-meta span,
.act-result-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4fb;
    color: #475467;
}

.act-empty,
.act-more-note {
    padding: 13px;
    border: 1px dashed var(--act-line);
    border-radius: var(--act-radius);
    background: var(--act-soft);
    color: var(--act-muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.act-actions,
.act-nav,
.act-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.act-actions,
.act-preset-row {
    margin-top: 12px;
}

.act-nav {
    justify-content: space-between;
    margin-top: 16px;
}

.act-inline-tip,
.act-help {
    color: var(--act-muted);
    font-size: 12px;
    line-height: 1.5;
}

.act-btn,
.act-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, box-shadow .2s, transform .2s, color .2s;
}

.act-btn:hover,
.act-pill-btn:hover {
    transform: translateY(-1px);
}

.act-btn:disabled {
    opacity: .62;
    cursor: not-allowed;
    transform: none;
}

.act-btn-primary {
    background: linear-gradient(135deg, var(--act-primary), var(--act-primary-dark));
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 107, 255, .2);
}

.act-btn-secondary {
    border-color: #b8d6ff;
    background: #fff;
    color: #134e8a;
}

.act-btn-secondary:hover {
    background: #f3f8ff;
}

.act-btn-success {
    background: linear-gradient(135deg, #0f9f8f, #087f75);
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 159, 143, .18);
}

.act-btn-danger {
    border-color: #f1b7b1;
    background: #fff5f4;
    color: #a22a21;
}

.act-btn-large {
    min-height: 46px;
    padding-inline: 22px;
    font-size: 14px;
}

.act-pill-btn {
    border-color: #cbd7e6;
    background: #fff;
    color: #1d3557;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
}

.act-segment {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 4px;
    padding: 4px;
    border: 1px solid #cbd7e6;
    border-radius: 999px;
    background: #fff;
}

.act-segment button {
    min-height: 32px;
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #31526f;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.act-segment button.active {
    background: var(--act-primary);
    color: #fff;
}

.act-wave-wrap {
    position: relative;
    min-height: 192px;
    border: 1px solid #1d2c44;
    border-radius: var(--act-radius);
    background: #101828;
    overflow: hidden;
}

.act-wave-wrap canvas {
    display: block;
    width: 100%;
    height: 190px;
}

.act-wave-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: #b7c6dd;
    font-size: 13px;
    text-align: center;
    background: linear-gradient(180deg, #101828, #15243a);
}

.act-selection {
    position: absolute;
    top: 0;
    bottom: 0;
    display: none;
    min-width: 2px;
    border-left: 2px solid #31d0aa;
    border-right: 2px solid #31d0aa;
    background: rgba(49, 208, 170, .22);
    pointer-events: none;
}

.act-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    display: none;
    width: 2px;
    background: #f87171;
    pointer-events: none;
}

.act-wave-caption {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    color: var(--act-muted);
    font-size: 12px;
}

.act-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.act-wave-section + .act-form-grid,
.act-batch-settings,
.act-quick-grid {
    margin-top: 14px;
}

.act-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.act-field label {
    color: #26364f;
    font-size: 13px;
    font-weight: 900;
}

.act-field input,
.act-field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd7e6;
    border-radius: 7px;
    background: #fff;
    color: #101828;
    padding: 8px 11px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.act-field input:focus,
.act-field select:focus {
    border-color: var(--act-primary);
    box-shadow: 0 0 0 3px rgba(15, 107, 255, .13);
}

.act-input-wrap {
    display: flex;
    align-items: stretch;
}

.act-input-wrap input {
    border-radius: 7px 0 0 7px;
}

.act-input-wrap span {
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border: 1px solid #cbd7e6;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f3f7fb;
    color: #475467;
    font-size: 12px;
    white-space: nowrap;
}

.act-range-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 10px;
    align-items: center;
}

.act-range-row input[type="range"] {
    padding: 0;
    accent-color: var(--act-primary);
}

.act-range-row output {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    background: #eef4fb;
    color: #0b4e9d;
    font-size: 12px;
    font-weight: 900;
}

.act-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.act-quick {
    padding: 12px;
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #fff;
    color: #1d3557;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.act-quick:hover {
    border-color: var(--act-primary);
    box-shadow: 0 8px 18px rgba(15, 107, 255, .12);
    transform: translateY(-1px);
}

.act-quick strong {
    display: block;
    font-size: 13px;
}

.act-quick span {
    display: block;
    margin-top: 4px;
    color: var(--act-muted);
    font-size: 12px;
}

.act-tips {
    display: grid;
    gap: 10px;
}

.act-tips div {
    padding: 12px;
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #fff;
}

.act-tips b {
    display: block;
    margin-bottom: 5px;
    color: #16233a;
    font-size: 13px;
}

.act-tips span {
    color: var(--act-muted);
    font-size: 12px;
    line-height: 1.55;
}

.act-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 11px;
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #fff;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.act-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--act-primary);
}

.act-progress-wrap {
    display: none;
    margin-top: 14px;
}

.act-progress-track {
    height: 22px;
    border-radius: 999px;
    background: #edf2f8;
    overflow: hidden;
}

.act-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #0f6bff, #0f9f8f);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    transition: width .2s;
}

.act-status {
    min-height: 26px;
    margin-top: 10px;
    color: var(--act-muted);
    font-size: 13px;
    text-align: center;
}

.act-status.success {
    color: var(--act-teal-dark);
}

.act-status.error {
    color: var(--act-red);
}

.act-log {
    max-height: 170px;
    overflow: auto;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #0f172a;
    color: #dbeafe;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.55;
}

.act-log div {
    white-space: pre-wrap;
    word-break: break-word;
}

.act-result-card {
    border: 1px solid var(--act-line);
    border-radius: var(--act-radius);
    background: #fff;
    overflow: hidden;
}

.act-result-body {
    padding: 11px;
}

.act-result-card audio {
    width: 100%;
    height: 38px;
    margin-top: 9px;
}

.act-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.act-error-item {
    padding: 10px;
    border: 1px solid #f5b7b1;
    border-radius: var(--act-radius);
    background: #fff5f4;
    color: #8a1f13;
    font-size: 12px;
}

.act-hidden {
    display: none !important;
}

@media (max-width: 992px) {
    .act-alert,
    .act-layout {
        grid-template-columns: 1fr;
    }

    .act-engine-state {
        justify-self: start;
    }

    .act-stat-grid,
    .act-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .act-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .act-panel-head {
        display: grid;
    }

    .act-form-grid,
    .act-quick-grid {
        grid-template-columns: 1fr;
    }

    .act-actions,
    .act-nav,
    .act-preset-row {
        align-items: stretch;
    }

    .act-btn,
    .act-pill-btn,
    .act-nav > * {
        width: 100%;
    }

    .act-drop {
        min-height: 190px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .act-tabs,
    .act-stat-grid,
    .act-summary {
        grid-template-columns: 1fr;
    }
}
