.asr-host-card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
    overflow: hidden;
}

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

.asr-tool {
    --asr-primary: #0f6fb5;
    --asr-primary-dark: #0a4f82;
    --asr-teal: #0d9488;
    --asr-teal-dark: #08766d;
    --asr-amber: #c77700;
    --asr-red: #d92d20;
    --asr-green: #138a5b;
    --asr-ink: #172033;
    --asr-muted: #667085;
    --asr-line: #d8e2ee;
    --asr-soft: #f5f8fc;
    --asr-soft-blue: #eef6ff;
    --asr-white: #fff;
    --asr-radius: 8px;
    --asr-shadow: 0 10px 24px rgba(22, 48, 80, .07);
    width: 100%;
    color: var(--asr-ink);
    background: linear-gradient(180deg, #fff 0%, #f7fafc 100%);
}

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

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

.asr-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    margin: 0;
    padding: 14px 18px;
    border-bottom: 1px solid #cddbeb;
    background: #f1f7ff;
    color: #1e4a78;
    font-size: 13px;
    line-height: 1.65;
}

.asr-alert i {
    color: var(--asr-primary);
    font-size: 18px;
    margin-top: 1px;
}

.asr-alert strong {
    display: block;
    color: #123b6e;
}

.asr-alert span {
    display: block;
}

.asr-engine-state {
    align-self: center;
    border: 1px solid #b8d6ff;
    border-radius: 999px;
    background: #fff;
    color: var(--asr-primary-dark);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.asr-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 18px;
    background: #edf3f8;
    border-bottom: 1px solid var(--asr-line);
}

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

.asr-tab:hover {
    border-color: var(--asr-teal);
    color: var(--asr-teal-dark);
    transform: translateY(-1px);
}

.asr-tab.active {
    background: linear-gradient(135deg, var(--asr-primary), var(--asr-primary-dark));
    border-color: var(--asr-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 111, 181, .18);
}

.asr-tab-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #e7f1ff;
    color: var(--asr-primary-dark);
    font-weight: 900;
}

.asr-tab.active .asr-tab-index {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.asr-tab b,
.asr-tab small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asr-tab b {
    font-size: 15px;
    font-weight: 900;
    color: inherit;
}

.asr-tab small {
    margin-top: 2px;
    font-size: 12px;
    color: currentColor;
    opacity: .82;
}

.asr-tab.is-done:not(.active) {
    border-color: rgba(13, 148, 136, .42);
    color: var(--asr-teal-dark);
}

.asr-body {
    padding: 18px;
}

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

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

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

.asr-process-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    gap: 16px;
    align-items: start;
}

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

.asr-results-panel {
    margin-top: 16px;
}

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

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

.asr-title i {
    color: var(--asr-primary);
}

.asr-note {
    margin: 3px 0 0;
    color: var(--asr-muted);
    font-size: 12px;
    line-height: 1.55;
}

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

.asr-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 224px;
    padding: 24px;
    border: 2px dashed #9ec8ff;
    border-radius: var(--asr-radius);
    background: linear-gradient(135deg, #f7fbff, #f1f8f6);
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s, transform .2s;
}

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

.asr-drop input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.asr-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #e8f2fb;
    color: var(--asr-primary);
    font-size: 28px;
}

.asr-drop-main,
.asr-drop-sub {
    display: block;
}

.asr-drop-main {
    color: #163152;
    font-size: 16px;
    font-weight: 900;
}

.asr-drop-sub {
    margin-top: 6px;
    color: var(--asr-muted);
    font-size: 13px;
}

.asr-actions,
.asr-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.asr-nav {
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #edf1f6;
}

.asr-inline-tip {
    color: var(--asr-muted);
    font-size: 13px;
}

.asr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 13px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .18s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}

.asr-btn:hover {
    transform: translateY(-1px);
}

.asr-btn:disabled {
    opacity: .58;
    cursor: not-allowed;
    transform: none;
}

.asr-btn-primary {
    background: var(--asr-primary);
    border-color: var(--asr-primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(15, 111, 181, .18);
}

.asr-btn-primary:hover {
    background: var(--asr-primary-dark);
    color: #fff;
}

.asr-btn-secondary {
    background: #fff;
    border-color: #bfd0e5;
    color: #17466f;
}

.asr-btn-secondary:hover {
    border-color: var(--asr-primary);
    color: var(--asr-primary-dark);
}

.asr-btn-danger {
    background: #fff;
    border-color: #ffd0cc;
    color: var(--asr-red);
}

.asr-btn-danger:hover {
    background: #fff5f4;
}

.asr-btn-success {
    background: var(--asr-green);
    border-color: var(--asr-green);
    color: #fff;
    box-shadow: 0 8px 18px rgba(19, 138, 91, .18);
}

.asr-btn-success:hover {
    background: #0f744c;
    color: #fff;
}

.asr-btn-lg {
    min-height: 46px;
    padding: 11px 18px;
    font-size: 15px;
}

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

.asr-stat,
.asr-metrics > div,
.asr-summary > div {
    border: 1px solid #e4ebf4;
    border-radius: 8px;
    background: #fbfdff;
    padding: 11px;
}

.asr-stat-value,
.asr-metrics strong,
.asr-summary strong {
    display: block;
    color: #102a43;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
}

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

.asr-file-list {
    display: grid;
    gap: 8px;
    max-height: 320px;
    margin-top: 12px;
    overflow: auto;
}

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

.asr-file-main {
    min-width: 0;
}

.asr-file-name {
    overflow: hidden;
    color: #1b2a41;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asr-file-meta {
    color: var(--asr-muted);
    font-size: 12px;
    margin-top: 2px;
}

.asr-file-remove {
    width: 34px;
    height: 34px;
    border: 1px solid #ffd0cc;
    border-radius: 8px;
    background: #fff;
    color: var(--asr-red);
    cursor: pointer;
}

.asr-more-note,
.asr-empty {
    border: 1px dashed #bfd0e5;
    border-radius: 8px;
    padding: 14px;
    background: #f8fbff;
    color: var(--asr-muted);
    font-size: 13px;
    text-align: center;
}

.asr-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.asr-preset {
    min-height: 74px;
    border: 1px solid #bfd0e5;
    border-radius: 8px;
    background: #fff;
    color: #17466f;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .18s;
}

.asr-preset:hover {
    border-color: var(--asr-teal);
    background: #f3fbf9;
    transform: translateY(-1px);
}

.asr-preset strong,
.asr-preset span {
    display: block;
}

.asr-preset strong {
    color: #102a43;
    font-size: 14px;
    font-weight: 900;
}

.asr-preset span {
    margin-top: 5px;
    color: var(--asr-muted);
    font-size: 12px;
}

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

.asr-form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.asr-field {
    display: grid;
    gap: 7px;
}

.asr-field label {
    color: #1b2a41;
    font-size: 13px;
    font-weight: 900;
}

.asr-field input[type="text"],
.asr-field select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #c9d7e8;
    border-radius: 8px;
    background: #fff;
    color: #1b2a41;
    padding: 8px 10px;
    outline: 0;
}

.asr-field input[type="text"]:focus,
.asr-field select:focus {
    border-color: var(--asr-primary);
    box-shadow: 0 0 0 3px rgba(15, 111, 181, .12);
}

.asr-field small {
    color: var(--asr-muted);
    font-size: 12px;
    line-height: 1.5;
}

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

.asr-range-wrap input[type="range"] {
    width: 100%;
    accent-color: var(--asr-primary);
}

.asr-range-value {
    min-width: 76px;
    border-radius: 999px;
    background: #e8f2fb;
    color: var(--asr-primary-dark);
    padding: 5px 9px;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
}

.asr-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.asr-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border: 1px solid #e4ebf4;
    border-radius: 8px;
    padding: 11px;
    background: #fbfdff;
    cursor: pointer;
}

.asr-check input {
    margin-top: 3px;
    accent-color: var(--asr-primary);
}

.asr-check b,
.asr-check small {
    display: block;
}

.asr-check b {
    color: #1b2a41;
    font-size: 13px;
}

.asr-check small {
    margin-top: 3px;
    color: var(--asr-muted);
    font-size: 12px;
    line-height: 1.45;
}

.asr-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 14px;
}

.asr-run-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #cddbeb;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fbff, #f3fbf9);
    padding: 16px;
}

.asr-run-card strong,
.asr-run-card span {
    display: block;
}

.asr-run-card strong {
    color: #102a43;
    font-size: 16px;
    font-weight: 900;
}

.asr-run-card span {
    margin-top: 5px;
    color: var(--asr-muted);
    font-size: 13px;
    line-height: 1.55;
}

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

.asr-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--asr-muted);
    font-size: 13px;
}

.asr-progress-meta strong {
    color: var(--asr-primary-dark);
}

.asr-progress {
    height: 12px;
    margin-top: 8px;
    border-radius: 999px;
    background: #e7edf5;
    overflow: hidden;
}

.asr-progress > div {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--asr-primary), var(--asr-teal));
    transition: width .2s ease;
}

.asr-status {
    margin-top: 12px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fbfdff;
    color: #35506b;
    padding: 12px;
    font-size: 13px;
    line-height: 1.65;
}

.asr-status.success {
    border-color: rgba(19, 138, 91, .32);
    background: #f2fbf6;
    color: #12623f;
}

.asr-status.error {
    border-color: rgba(217, 45, 32, .32);
    background: #fff5f4;
    color: #9d2018;
}

.asr-result-count {
    border: 1px solid #c9d7e8;
    border-radius: 999px;
    background: #fff;
    color: var(--asr-primary-dark);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.asr-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.asr-result-card {
    display: grid;
    gap: 10px;
    border: 1px solid #e2eaf4;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.asr-result-audio audio {
    width: 100%;
    height: 38px;
}

.asr-result-name {
    overflow: hidden;
    color: #1b2a41;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asr-result-meta {
    margin: 5px 0 10px;
    color: var(--asr-muted);
    font-size: 12px;
    line-height: 1.55;
}

.asr-error-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.asr-error-item {
    border: 1px solid #ffd0cc;
    border-radius: 8px;
    background: #fff5f4;
    color: #9d2018;
    padding: 10px;
    font-size: 13px;
}

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

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

    .asr-alert {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .asr-engine-state {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 720px) {
    .asr-tabs,
    .asr-stat-grid,
    .asr-metrics,
    .asr-summary,
    .asr-preset-grid,
    .asr-form-grid,
    .asr-check-grid {
        grid-template-columns: 1fr;
    }

    .asr-body,
    .asr-panel-body {
        padding: 14px;
    }

    .asr-tabs {
        padding: 12px;
    }

    .asr-run-card,
    .asr-nav {
        align-items: stretch;
        flex-direction: column;
    }

    .asr-btn {
        width: 100%;
    }
}
