* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: #f5f6f8;
    color: #323233;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.query-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.query-title {
    margin: 0 0 20px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #323233;
}

.query-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
    overflow: hidden;
}

.search-card {
    padding: 20px 16px 16px;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #ebedf0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #1989fa;
}

.search-btn {
    flex-shrink: 0;
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    background: #1989fa;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #1677d9;
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.order-card {
    padding: 0;
}

.order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #f5f6f8;
}

.order-name {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    color: #323233;
    word-break: break-all;
}

.status-badge {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.status-done {
    background: #e8f8ef;
    color: #07c160;
}

.status-running {
    background: #e8f3ff;
    color: #1989fa;
}

.status-warning {
    background: #fff7e8;
    color: #ed6a0c;
}

.status-error {
    background: #ffece8;
    color: #ee0a24;
}

.status-default {
    background: #f2f3f5;
    color: #969799;
}

.order-body {
    padding: 4px 16px 12px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.info-label {
    flex-shrink: 0;
    width: 42px;
    color: #969799;
}

.info-value {
    flex: 1;
    color: #323233;
    word-break: break-all;
}

.progress-row .info-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-track {
    flex: 1;
    display: block;
    height: 8px;
    background: #ebedf0;
    border-radius: 999px;
    overflow: hidden;
    line-height: 0;
}

.progress-fill {
    display: block;
    height: 100%;
    min-width: 0;
    background: linear-gradient(90deg, #1989fa, #39b9fa);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.progress-text {
    flex-shrink: 0;
    min-width: 42px;
    text-align: right;
    font-size: 13px;
    color: #646566;
}

.notice-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f2f3f5;
    color: #969799;
    font-size: 12px;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid #f5f6f8;
}

.action-btn {
    min-width: 56px;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.action-btn:hover {
    opacity: 0.88;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-detail {
    background: #1989fa;
    color: #fff;
}

.btn-sync {
    background: #07c160;
    color: #fff;
}

.btn-brush {
    background: #ff976a;
    color: #fff;
}

.btn-muted {
    background: #f2f3f5;
    color: #646566;
}

.empty-box {
    padding: 48px 20px;
    text-align: center;
    color: #969799;
    font-size: 14px;
}

.empty-box p {
    margin: 8px 0 0;
}

.detail-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.45);
}

.detail-modal {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    padding: 20px 16px 16px;
}

.detail-modal h3 {
    margin: 0 0 16px;
    font-size: 17px;
    text-align: center;
}

.detail-modal .info-row {
    padding: 6px 0;
}

.detail-close {
    display: block;
    width: 100%;
    height: 40px;
    margin-top: 16px;
    border: none;
    border-radius: 8px;
    background: #f2f3f5;
    color: #323233;
    font-size: 14px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .order-actions {
        justify-content: space-between;
    }

    .action-btn {
        flex: 1 1 calc(33.33% - 8px);
        min-width: 0;
    }
}
